home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 126-150 / disk_143 / rim / rimdocs.arc / RIMDOC.DOC < prev   
Text File  |  1986-01-20  |  138KB  |  4,430 lines

  1.     PC - Relational Information Management
  2.     PC-RIM V5 Manual
  3.                                        DEFINITIONS
  4.        ATTRIBUTE:      An attribute is a 1-8 character alphanumeric name
  5.                        used to identify a specific column of a relation.
  6.        DOMAIN:         A domain is the set of values which are permissible
  7.                        in a column of a two-dimensional table of data
  8.                        (relation).
  9.        KEY:            An attribute may be specified to be "KEY".  This
  10.                        specification will cause RIM to build an index for
  11.                        the attribute.  Under certain conditions, this
  12.                        index will greatly improve the system efficiency
  13.                        for queries and updates.
  14.        RELATION:       A relation is a two-dimensional table of data.  The
  15.                        column headings are the attributes of the relation
  16.                        and the rows are the data occurences (tuples).
  17.        ROW:            A row is the set of values in a row of a two-
  18.                        dimensional table (relation).  A row is sometimes
  19.                        referred to as a tuple.
  20.        SCHEMA:         The schema is the definition of the relations and
  21.                        their attributes that comprise the data base.  The
  22.                        relation passwords and constraint rules also are
  23.                        part of the schema.
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.                            Page 1
  61.  
  62.                               
  63.                               
  64.  
  65.  
  66.                                          SUMMARY
  67.        This document is the user's guide (MSDOS/8088) for the Relational
  68.        Information Management System, Version 5 (RIM-5).  The information
  69.        presented consists of instructions for using RIM-5 as a standalone
  70.        system and for using RIM-5 in conjunction with an application
  71.        program.
  72.        Section 1.0 presents the method of implementation and access for
  73.        RIM-5, a discussion of the files used by RIM-5, and the general
  74.        syntax of the RIM-5 command language.
  75.        Section 2.0 presents instructions for the use of RIM-5 as a
  76.        standalone system in both menu and command modes.  In the menu
  77.        mode, you are prompted for the inputs required to create, update,
  78.        and/or query the data base.  The command mode, as an alternative,
  79.        requires the direct input of RIM-5 commands to create, update,
  80.        and/or query the data base.  A discussion of all the available
  81.        RIM-5 command is presented in this section.
  82.        Section 3.0 presents the instructions for the application program
  83.        interface.  Any programming language that can call FORTRAN
  84.        subroutines can be used.
  85.        The appendices present a summary of the RIM-5 commands, a summary
  86.        of the application program interface, a sample RIM FORTRAN
  87.        program, a list of the current limitations, and a discussion of
  88.        the LXLREC free field input routine.
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.                            Page 2
  120.  
  121.                               
  122.                               
  123.  
  124.  
  125.                                       1.0  OVERVIEW
  126.        The Relational Information Management (RIM) System was originally
  127.        developed as a prototype data base management system by Dennis L.
  128.        Comfort and Wayne J. Erickson at The Boeing  Company under NASA
  129.        Contract NAS1-14700 (IPAD).  Mr. Erickson at the University of
  130.        Washington, and Frederick P. Gray at The Boeing Company made en-
  131.        hancements to the system which culminated in RIM Version 4 (RIM-
  132.        4) . RIM-5, which is the version of RIM described in this
  133.        document, was developed by Mr. Erickson for NASA and Mr. Gray and
  134.        Geofferey Von Limbach for Boeing.  RIM is based upon the relational
  135.        algebra model for data management and has been used for both en-
  136.        gineering and business data.  The system is available as a stand-
  137.        alone system and through an application program interface.  The
  138.        standalone system may be executed in two modes: menu or command.
  139.        The menu mode prompts the user for the input required to create,
  140.        update, and/or query the data base.  The command mode requires the
  141.        direct input of RIM commands.
  142.     (IPAD stands for Integrated Programs for Aerospace Design if anyone
  143.     is interested...)
  144.        RIM-5 includes several enhancements relative to RIM-4, including:
  145.             .   highly portable FORTAN code
  146.             .   additional scientific attribute types for vectors and
  147.                 matrices
  148.             .   variable length attributes
  149.             .   improved sort option
  150.             .   improved where clause
  151.             .   an initial set of report writing commands
  152.             .   introduction of tolerance for floating point numbers
  153.             .   additional schema modification commands
  154.             .   enhanced FORTAN interface
  155.             .   RIM-to-RIM communications file
  156.        To the interactive/batch user the RIM-5 creation, update, and
  157.        query are, for the most part, identical to RIM-4.  Data bases form
  158.        RIM-4 must be reloaded for RIM-5, however.  In addition, the ap-
  159.        plication program interface has been expanded and modified to ac-
  160.        comodate increased capabilities.
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.                            Page 3
  181.  
  182.                               
  183.                               
  184.  
  185.  
  186.        1.1  IMPLEMENTATION AND ACCESS
  187.        RIM is written entirely in FORTRAN 77.  It requires approximately
  188.        300000 (decimal) bytes of virtual memory when run as a standalone
  189.        program.
  190.        Access to RIM depends on the execution method desired.  To execute
  191.        the standalone system, the following control statement is needed:
  192.             RUN  [rimact ]RIM
  193.        where rimact is the name of the user directory on which RIMABS and
  194.        the RIM HELP data base files reside.
  195.        To use the RIM application program interface you need to link
  196.        RIMLIB to your application program.  This can be done with the
  197.        following instruction:
  198.             LINK JOBA,[rimact]RIMLIB/LIB
  199.        where rimact is the name of the user directory on which RIMLIB
  200.        resides.  JOBA is the name of the object file of your application
  201.        program.
  202.        1.2 DATA BASE FILES
  203.        Each data base consists of three RIM-generated files whose logical
  204.        names are formed by suffixing the data base name with a 1,2, and
  205.        3.  The first file contains directory data, the second file con-
  206.        tains the actual data for each relation, and the third file con-
  207.        tains key element pointers.  The default type for these files are
  208.        "DAT".  RIM uses logical files FOR005 and FOR006 for input and
  209.        output.
  210.        If your data base files do not reside on your directory with names
  211.        equal to the logical data base files names, you must use the as-
  212.        sign control statements prior to the RIM execution to assign
  213.        required names to your data base files.  You may also assign your
  214.        input and outout files to files other than FOR005 and FOR006  if
  215.        desired.
  216.        1.3 GENERAL COMMAND SYNTAX
  217.        RIM is used by entering commands, (which start with keywords) in
  218.        response to input prompts (which vary according to the submodule
  219.        in use).  Three of the commands (DEFINE, HELP, and LOAD), are used
  220.        to enter submodules which have their own sets of commands for
  221.        defining and loading a data base.  In describing commands, the
  222.        following conventions are used:
  223.             relname
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.                            Page 4
  240.  
  241.                               
  242.                               
  243.  
  244.  
  245.                 or                      name of a relation(s)
  246.              relname1,relname2,...
  247.              attname
  248.                 or                      name of an attribute(s)
  249.              attname1,attname2,...
  250.              value
  251.                 or                      actual values(s)
  252.              value1,value2,...          (value may be a text string,
  253.                                 scalar, vector, or matrix)
  254.        All relation and attribute names must contain at least 1 and no
  255.        more than 8 alphanumeric characters.
  256.        Many of the commands in RIM have optional parts.  These optional
  257.        parts are enclosed in square brackets.
  258.              [THIS IS OPTIONAL]
  259.        Some keywords in the commands are selected from a list of accep-
  260.        table keywords.  These keywords are in a vertical list with the
  261.        first choice enclosed in braces.
  262.              {CHOOSE}
  263.               ONE
  264.               OF
  265.               THESE
  266.        RIM command keywords may be abbreviated.  At least the first
  267.        3 characters in the keywords are required.
  268.        The following are equivalent:
  269.         1)   SELECT, FROM, WHERE, DELETE DUPLICATES
  270.         2)   SELEC, FRO, WHER, DELETE DUP
  271.         3)   SEL, FRO, WHE, DEL DUP
  272.        All commands in RIM are entered in a free-field format with blanks
  273.        and commas as separators.  the following contains a short descrip-
  274.        tion of RIM conventions and data generation facilities.  An exten-
  275.        sive description, intended for the experienced RIM user, can be
  276.        found in Appendix E.
  277.        Keywords and data values are separated by blanks or commas.  If a
  278.        command is too long for one 80 character line, it may be continued
  279.        on succeeding lines by entering "+" as the last character of the
  280.        preceding line.  RIM remembers each previous command.  This en-
  281.        ables you to re-use all or part of the previous command.  This is
  282.        done by using an asterisk to indicate which items of the previous
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.                            Page 5
  299.  
  300.                               
  301.                               
  302.  
  303.  
  304.        command are to be re-used.  A single asterisk means re-use the
  305.        corresponding  single item of the previous record.  An asterisk
  306.        followed by a number n means re-use the next n corresponding
  307.        items.  Two asterisks mean re-use all remaining corresponding
  308.        items.
  309.        The following are all equivalent:
  310.         1)  THIS IS A COMMAND
  311.         2)  THIS +
  312.             IS +
  313.             A +
  314.             COMMAND
  315.         3)  * IS,A COMMAND
  316.         4)  THIS *2 COMMAND
  317.         5)  THIS **
  318.        Multiple commands may be entered on one line separated by a semi-
  319.        colon or $.
  320.         THIS IS THE FIRST ; THIS IS THE SECOND $ THIS IS THE THIRD
  321.        Comments may be placed anywhere within a command by enclosing the
  322.        comment between the characters *( and ).
  323.         *(THIS IS A COMMENT)  THIS IS NOT
  324.        When numeric data is to be interpreted as text (alphanumeric)
  325.        data, the numerals must be enclosed by quotation marks.
  326.         "1234"
  327.        When entering text strings which contain embedded blanks or
  328.        commas, the entire string must be enclosed by quotation marks.
  329.         "THIS IS A TEXT STRING"
  330.        A text string may require continuation on one or more lines.  The
  331.        + sign continuation can then be used within the quotation marks.
  332.        It is not recommended that you use leading blanks in text strings.
  333.        Text which does not have embedded blanks or commas does not
  334.        require quotes.
  335.        Integer data is input as a string of digits without a decimal
  336.        point.  A sign may precede the digits.
  337.         123, -63, +56, 0
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.                            Page 6
  358.  
  359.                               
  360.                               
  361.  
  362.  
  363.        Real or floating point numbers must include a decimal point or E
  364.        for the exponent.  If a decimal point is not present, the E must
  365.        be preceded by an integer.
  366.         1.3, .005, 0., 6.E-1, 6E-1, 0.60, -23.45
  367.        The size of real numbers is limited to the range between 1.0E-38
  368.        and 1.0E+38.
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.                            Page 7
  417.  
  418.                               
  419.                               
  420.  
  421.  
  422.                                    2.0  RIM EXECUTION
  423.        Execution of RIM as a standalone program can be effective in two
  424.        modes, command mode or menu mode.  The command mode is used when
  425.        RIM is executed in the batch environment or for interactive users
  426.        who wish to bypass the menu dialogue.  A detailed description of
  427.        the commands are given in section 2.1.  The menu mode offers as-
  428.        sistance to inexperienced users.  An overview of this mode is
  429.        discussed in section 2.2 and a more detailed description of the
  430.        menu mode dialogue is given in section 2.3.  The interactive user
  431.        may switch freely between menu mode and command mode.
  432.        When executing RIM interactively, the first output to your display
  433.        will be:
  434.             BEGIN RIM ---- VAX VERSION 5.0  UDXX      YY/MM/DD  HH.MM.SS
  435.             RIM COMMAND MODE
  436.             ENTER "MENU" FOR MENU MODE
  437.        UDXX identifies the update level of RIM.  The date and time stamp
  438.        indicate current date and time.  At the start of execution you
  439.        are in the command mode but you may switch immediately to the menu
  440.        mode as indicated.
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.                            Page 8
  476.  
  477.                               
  478.                               
  479.  
  480.  
  481.        2.1  RIM COMMANDS
  482.        This section presents a summary of the RIM commands.  You are
  483.        restricted from using certain commands based on the knowledge of
  484.        assigned passwords.  If no passwords are assigned to the relations
  485.        by the data base owner, there are no command restrictions (the
  486.        DEFINE submodule excepted).  See figure 2.1-1.
  487.        2.1.1  General Commands
  488.        HELP Command
  489.        The HELP command allows you to obtain: a description of the
  490.        available RIM commands, a discussion of the general command
  491.        syntax, a summary of all available commands, and general news
  492.        about the RIM system. HELP is available at any time during
  493.        execution except when in the menu mode.
  494.        To receive help when in the command mode enter:
  495.        HELP [{command name}]
  496.         RIM
  497.         SYNTAX
  498.         WHERE
  499.         SUMMARY
  500.         NEWS
  501.         SORT
  502.         INPUT FORMAT
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.                            Page 9
  535.  
  536.                               
  537.                               
  538.  
  539.  
  540.                                               CURRENT PASSWORD
  541.        SECTION NUMBER     COMMAND
  542.                                                    OWNER  MODIFY  READ   NONE
  543.         . 2.4.1        . GENERAL                     X       X      X     X
  544.         . 2.4.2        . DEFINE                      X
  545.         . 2.4.3        . LOAD                        X       X
  546.         . 2.4.4        . DATA BASE QUERY             X       X      X
  547.         . 2.4.5        . SCHEMA QUERY                X       X 2    X 2
  548.         . 2.4.6        . COMPUTATION                 X       X      X
  549.         . 2.4.7        . DATA BASE MODIFICATION      X       X
  550.         . 2.4.8        . SCHEMA MODIFICATION         X       X 1
  551.         . 2.4.9        . RELATIONAL ALGEBRA          X       X
  552.         . 2.4.10       . REPORT GENERATION           X       X      X
  553.         . 2.4.11       . COMMUNICATION               X       X
  554.                            1 EXCEPT CHANGE OWNER        2 EXCEPT PRINT RULES
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.                           Page 10
  594.  
  595.                               
  596.                               
  597.  
  598.  
  599.        The HELP submodule available inside the HELP submodule are identical to
  600.        the HELP commands except that the keyword HELP is omitted.  The
  601.        HELP submodule displays information one screen at a time.  After
  602.        each screen you will have the option to continue displaying the
  603.        text by entering * or to return to the HELP submodule by entering QUIT.
  604.        You will remain in the submodule until you enter an END command which
  605.        will return to the command mode.
  606.        MENU Command
  607.        The MENU command places you in the menu mode.  It may be entered
  608.        at any point when in command mode except when in the DEFINE, HELP,
  609.        or LOAD submodules.  The menu mode is particularly useful for
  610.        schema definition and data loading.
  611.         MENU
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.                           Page 11
  653.  
  654.                               
  655.                               
  656.  
  657.  
  658.        OPEN Command
  659.        The OPEN command is required whenever an existing data base is to
  660.        be used.  You specify the name of the data base.  RIM uses the
  661.        name of the data base to form the names of the three files which
  662.        contain the data base.  The data base files must either reside
  663.        in your dictionary or you must make a logical file assignment prior
  664.        to RIM execution.
  665.        OPEN dbname
  666.        Only one RIM data base may be open at a time (if you don't close
  667.        the present data base before opening a new one, RIM will auto-
  668.        matically close the present data base.)  The OPEN command must be
  669.        issued before any commands that require data from the data base
  670.        can be processed.
  671.        CLOSE Command
  672.        The CLOSE command permits you to close a RIM data base without
  673.        leaving RIM.  This enables you to close one data base, then
  674.        open or define a different one, all within one RIM session.
  675.        This command is not needed if only one RIM data base is acces-
  676.        sed during a RIM session.  This command results in update of
  677.        the data base files to reflect all changes you have made to
  678.        the data base.
  679.         CLOSE
  680.        Note: the current data base will be closed for you when you
  681.        leave RIM by issuing an EXIT command.
  682.        USER Command
  683.        This command is used to specify your user password to RIM.
  684.        Your user password is used to check against read and modify
  685.        passwords specified for the relations.  Each time this com-
  686.        mand is issued, the new password replaces the current user
  687.        password.  The default password is the word NONE.
  688.         USER password
  689.        INPUT Command
  690.        This command is used to specify the name of a file which
  691.        contains the RIM commands and/or input data.  Alternate
  692.        input file names may be assigned as often as required.
  693.        The use of this command allows you to define command pro-
  694.        cedures on a file and then have RIM execute the set of
  695.        commands without user interaction.
  696.         INPUT filename
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.                           Page 12
  712.  
  713.                               
  714.                               
  715.  
  716.  
  717.        The last command on the alternate input file should be INPUT
  718.        INPUT which returns input to the batch input file or your
  719.        terminal.  INPUT TERMINAL will, for interactive jobs, do the
  720.        same thing.
  721.        OUTPUT Command
  722.        This command is used to specify the name of the output file.
  723.        Specifying a file other than OUTPUT will result in the output
  724.        from the RIM commands being placed on the specified file name.
  725.        The output file name may be changed as often as desired.  The
  726.        use of this command allows the interactive user to get an
  727.        offline hardcopy output from RIM.
  728.         OUTPUT filename
  729.        OUTPUT OUTPUT will return the output to the batch output file
  730.        or your terminal.  OUTPUT TERMINAL will, for interactive
  731.        jobs, do the same thing.
  732.        ECHO Command
  733.        This command is used to control the printing of your input
  734.        commands on the output file.  Default is for ECHO printing
  735.        enter:
  736.         ECHO
  737.        NOECHO Command
  738.        The NOECHO command turns off ECHO printing.
  739.         NOECHO
  740.        TOLERANCE Command
  741.        For attributes which contain floating point numbers, a tolerance
  742.        may be used to qualify equality, nonequality and order.  The tol-
  743.        erance applies to any real or double precision number you use in a
  744.        WHERE clause.  If A is an attribute with value a, and r is a user
  745.        specified number used in a WHERE clause, and t a tolerance (posi-
  746.        tive, zero, negative), the following are true conditions:
  747.         A EQ r if and only if r-t <= a <= r+t
  748.         A NE r if and only if a < r-t or a > r+t
  749.         A GT r if and only if a > r-t
  750.         A GE r if and only if a => r-t
  751.         A LT r if and only if a < r+t
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.                           Page 13
  771.  
  772.                               
  773.                               
  774.  
  775.  
  776.         A LE r if and only if a <= r+t
  777.        If t is a percentage tolerance, t is to be replaced with t x r/100
  778.        in the above expressions to define true conditions for percentage
  779.        tolerances.
  780.         TOLERANCE tol [PERCENT]
  781.        where tol is the tolerance and the presence or absence of the
  782.        keyword PERCENT indicates whether tol is a percentage tolerance
  783.        or an absolute tolerance.  The TOLERANCE command can be used
  784.        as many times as desired to reset the tolerance.  A tolerance
  785.        stays in effect for a session until a new tolerance is speci-
  786.        fied.  The default value for tolerance is 0. .
  787.        NOCHECK Command
  788.        Rule checking applies to the CHANGE and LOAD commands. Default
  789.        is that rules, if defined, are enforced.  The NOCHECK command
  790.        suppresses the ruler checking.
  791.         NOCHECK
  792.        CHECK command
  793.        The CHECK command turns on rule checking.  The CHECK and NOCHECK
  794.        commands may be issued as many times as required anywhere in
  795.        the input stream.
  796.         CHECK
  797.        EXIT Command
  798.        To leave RIM without dropping your current data base enter:
  799.         {EXIT}
  800.          QUIT           
  801.        This command closes your current data base.  Data needed by your data
  802.        bases is copied from the incore working areas to the logical files
  803.        whose names were determined by the OPEN command or by the data base
  804.        name designated in the DEFINE submodule.
  805.        RELOAD Command
  806.        The RELOAD command is used whenever you want to rebuild the data
  807.        files of your data base to recover unused space created by row
  808.        deletions, relation removals, and certain attribute changes.
  809.        When a row is deleted or a relation removed, its space is not reused
  810.        until you issue this command.  In addition, if a variable length
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.                           Page 14
  830.  
  831.                               
  832.                               
  833.  
  834.  
  835.        attribute is modified so that it increases in length, the row is
  836.        deleted and replaced with a new one.  the old row becomes unused
  837.        space.  If your data base has any KEY attributes, then the access
  838.        pointer files maintained for those attributes are also rebuilt.
  839.        The syntax for the command is:
  840.         RELOAD
  841.        2.1.2  Define Submodule Commands
  842.        Define Submodule Commands
  843.        The Define submodule (prompt = D> ) commands  are used to define the
  844.        structure of the data base and are used in the sequence described
  845.        below.  The definition of the data base is called the schema.  The
  846.        schema name is the name of the data base and forms the essential part
  847.        of the names of the files used for the data base.
  848.        Attributes, relations, passwords, and constraints (rules) are defined
  849.        using this submodule.  The naming conventions for schema definition
  850.        are described in section 2.3.3.  To access this submodule enter:
  851.         DEFINE dbname
  852.        You must identify the name of the data base whose definition you are
  853.        going to create or expand by specifying the schema name.  This name
  854.        is used to form the name of the files used to store the data base
  855.        tables.  The dbname, when augmented with a single number must be
  856.        a legal filename.  Once dbname is specified you must identify the
  857.        owner password of the definition.
  858.         OWNER password
  859.        If the data base already exists and you want to define additional
  860.        attributes or relations, "password" is checked against the existing
  861.        owner password.
  862.         
  863.         ATTRIBUTES
  864.         attname type1 [{length}] [KEY]
  865.                         VAR
  866.         attname type2 [{row,col}] [KEY]
  867.                         row,VAR
  868.                         VAR,VAR
  869.        -
  870.        -
  871.        -
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.                           Page 15
  889.  
  890.                               
  891.                               
  892.  
  893.  
  894.        The attribute definitions are ended when you specify one of the
  895.        keywords RELATIONS, PASSWORDS or RULES
  896.        Type1 Attributes:
  897.        RIM supports seven data types of "type1": real (floating point),
  898.        integer, text, double precision, real vectors, integer vectors and
  899.        double precision vectors.  You must enter REAL, INT, TEXT, DOUB,
  900.        RVEC,IVEC or DVEC for type1.  The default length is one number,
  901.        except for TEXT for which it is 8 characters.  The length is speci-
  902.        fied in number of values and characters respectively.  VAR indicates
  903.        variable length.  The optional KEY specification causes an index file
  904.        to be built for the attributes which is used by RIM to quickly find
  905.        qualifying rows for retrievals and updates.  The default is that such
  906.        an index file is not built (non-key attribute).  You should consider
  907.        the cost of building and storing index file data versus the benefits
  908.        you will obtain from quicker retrievals when deciding if a KEY declara-
  909.        tion should be used.  No specific rules can be given here, experience
  910.        should be used to judge.  An attribute can be changed from KEY to NON-
  911.        KEY or vice-versa by using the BUILD KEY and DELETE KEY commands des-
  912.        cribed in section 2.1.8.  For large data bases (more than 1,000 rows) ,
  913.        experience has shown that it is most efficient not to specify a KEY in
  914.        the DEFINE submodule but rather to load the data without keys and to
  915.        later cause index files to be built using the BUILD KEY command.  The
  916.        greater the number of keys, the more efficient this method is.
  917.        Type2 Attributes:
  918.        RIM supports three data types of "type2": real matrices, integer
  919.        matrices or double precision matrices.  You must enter RMAT, IMAT
  920.        or DMAT for type2.  The matrices can be of fixed size, have variable
  921.        column dimension or variable row and column dimensions.  You enter
  922.        the row dimension first, followed by the column dimension.  Default
  923.        dimension is 1x1.  The key-word KEY has the same meaning as for
  924.        "type1" attributes.
  925.        To define relations enter:
  926.         RELATIONS
  927.                 relname WITH attname1 [attname2...]
  928.                  -
  929.                  -
  930.                  -
  931.        The relation definitions are ended by specifying one of the key-
  932.        words ATTRIBUTES, PASSWORDS, RULES, or END which start the other
  933.        sections of the DEFINE submodule or finishes the schema definition.
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.                           Page 16
  948.  
  949.                               
  950.                               
  951.  
  952.  
  953.        The attributes must be listed in the order in which they are to
  954.        appear in the relation.  No attributes can be used which have not
  955.        been previously defined, either in the current attributes definition
  956.        subsection or in a previous definition of this data base.  Attri-
  957.        butes which are defined but not included in a relation will not be-
  958.        come part of the RIM schema.
  959.        A RIM data base must have attributes and relations defined, but
  960.        passwords and constraint rules are optional.  If read or modify
  961.        passwords are desired enter:
  962.         PASSWORDS
  963.         {READ PASSWORD} FOR relname IS password
  964.          RPW
  965.         {MODIFY PASSWORD} FOR relname IS password
  966.          MPW
  967.                     -
  968.                     -
  969.                     -
  970.        The password definitions are ended by specifying one of the key-
  971.        words ATTRIBUTES, RELATIONS, RULES, or END which start the other
  972.        sections of the DEFINE submodule or finishes the data base defini-
  973.        tion.  Passwords can be any string of alphanumeric characters up
  974.        to 8 characters long.  When you are doing queries, loads, or modi-
  975.        fications, the current password is specified by the USER command.
  976.        If this password does not match the read, modify, or owner pass-
  977.        word for a given relation, you can query that relation.  If this
  978.        password does not match the modify or owner password, you cannot
  979.        load or modify the relation.
  980.        Constraint rules are another optional section of the DEFINE sub-
  981.        module.  If rules are specified, they are used during the loading
  982.        process or during CHANGE commands to screen out rows which do not
  983.        meet the constraint rules.  Rules are specified by relation.  At
  984.        most
  985.        10 rules may be specified for a single relation.  There are several
  986.        options available in the rule definition section.  To define
  987.        constraint rules enter:
  988.         RULES
  989.         attname [IN relname]  {EQ} value [ {AND} attname ...]
  990.                                NE            OR
  991.                                GT
  992.                                GE
  993.                                LT
  994.                                LE
  995.        or
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.                           Page 17
  1007.  
  1008.                               
  1009.                               
  1010.  
  1011.  
  1012.         attname1 IN relname {EQA} attname [ {AND} ...]
  1013.                              NEA              OR
  1014.                              GTA
  1015.                              LTA
  1016.                              LEA
  1017.        where:  EQ  = Equals
  1018.                NE  = Not equal to
  1019.                GT  = Greater than
  1020.                GE  = Greater than or equal to
  1021.                LT  = Less than
  1022.                LE  = Less than or equal to
  1023.                EQA = Equals attribute
  1024.                NEA = Not equal to attribute
  1025.                LTA = Less than attribute
  1026.                LEA = Less than or equal to attribute
  1027.        The rule definitions are ended by specifying one of the key-
  1028.        words ATTRIBUTES, RELATIONS, PASSWORDS, or END which start
  1029.        the other sections of the DEFINE submodule or finishes the
  1030.        schema definition.  Attributes referenced in the rule defini-
  1031.        tions must have been previously defined.  By specifying
  1032.        rules, you can restrict an attribute to a range of values or
  1033.        require that the value of an attribute in one relation have
  1034.        a specified relationship to the values of an attribute in
  1035.        the same or different relation.  The comparison operators
  1036.        ending in A are used when the comparison is to existing
  1037.        attribute values rather than to a specified constant.  A
  1038.        rule expression may contain a maximum of 9 Boolean operators.
  1039.        The method used for constraint checking is that the first
  1040.        attribute mentioned in the rule is taken from the input
  1041.        (LOAD or CHANGE command) data and checked against the re-
  1042.        mainder of the rule expression using existing values in
  1043.        the data base.
  1044.        To finish the schema definition you enter the following
  1045.        keyword and leave the DEFINE submodule:
  1046.         END
  1047.        Example of DEFINE submodule commands:
  1048.         DEFINE RIMDS
  1049.         OWNER ME
  1050.          ATTRIBUTES
  1051.           MODEL TEXT KEY
  1052.           WEIGHT REAL
  1053.           NUMPASS INT
  1054.           CARRIER TEXT
  1055.           FLIGHTNO INT
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065.                           Page 18
  1066.  
  1067.                               
  1068.                               
  1069.  
  1070.  
  1071.           NAME TEXT KEY                 
  1072.           AGE INT
  1073.           UPDATE IMAT 4,VAR
  1074.          RELATIONS
  1075.           AIRPLANE WITH MODEL WEIGHT NUMPASS
  1076.           FLIGHTS WITH CARRIER FLIGHTNO MODEL UPDATE
  1077.           PEOPLE WITH NAME AGE
  1078.          PASSWORDS
  1079.           MPW FOR FLIGHTS IS AGENT
  1080.           RPW FOR PEOPLE IS BLUE
  1081.          RULES
  1082.           MODEL IN FLIGHTS EQA MODEL IN AIRPLANE
  1083.           AGE GT 21 AND AGE LT 65
  1084.           NUMPASS IN AIRPLANE LE 350
  1085.        2.1.3  Load Submodule Commands
  1086.        The LOAD submodule (prompt = L>) commands are used to add rows to
  1087.        a newly defined relation or to add rows to a relation which
  1088.        already contains data.  To access this submodule enter:
  1089.         LOAD relname
  1090.        You may now load rows into the relation, one row at a time, by
  1091.        entering data values in an order corresponding to the attribute
  1092.        order:
  1093.         value1 value2 ... valuen
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.                           Page 19
  1125.  
  1126.                               
  1127.                               
  1128.  
  1129.  
  1130.        The method used to input values for the different attribute types
  1131.        is shown below:
  1132.                Attribute
  1133.                  Length or
  1134.          Type    Dimension        Valuei                 Remark
  1135.        REAL,INT   n n=>1      (val1 ... valn)          Parentheses
  1136.        DOUB,RVEC                                       optional
  1137.        IVEC,DVEC
  1138.        REAL,INT   VAR         (val1 val2 ...)          Parentheses
  1139.        DOUB,RVEC                                       required
  1140.        IVEC,DVEC
  1141.        TEXT       any         "text string"            In many cases,
  1142.                                               (see section 1.3)
  1143.                                                 " " is optional
  1144.        RMAT,IMAT  m,n      ((r1c1...rmc1)(r1c2...) +   Columnwise
  1145.        DMAT                     ...rmcn))              Parentheses
  1146.                                                        optional
  1147.        RMAT,IMAT  m,VAR    ((r1c1...) (r1c2...)...))   Columnwise
  1148.        DMAT        or                                   Parentheses
  1149.                   VAR,VAR                              required
  1150.        -----------------------------------------------------------------------
  1151.        To finish data loading you enter:
  1152.         END
  1153.        Multiple relations may be loaded from within the LOAD submodule by
  1154.        re-entering the LOAD command instead of the END command.
  1155.        Example of LOAD submodule commands:
  1156.                 USER AGENT
  1157.                 LOAD AIRPLANE
  1158.                 DC9 87000.  110
  1159.                 747SP 200000.  350
  1160.                 LOAD PEOPLE
  1161.                 BOB 30
  1162.                 JOE 32
  1163.                 ALICE 29
  1164.                 LOAD FLIGHTS
  1165.                 UAL 16 "757"  ((1,2,3,4) (4,5,6,7))
  1166.                 *3 ((2,4,5,8)(1,2,3,4) (4,5,6,7))
  1167.                 END
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.                           Page 20
  1184.  
  1185.                               
  1186.                               
  1187.  
  1188.  
  1189.        If the value for an attribute is unknown, you enter the characters
  1190.        -0- for the missing value or use two successive commas.
  1191.         L1011 -0- -0- 250
  1192.         L1011,,,250
  1193.        These two input entries have identical meaning.
  1194.        2.1.4  Commands for Querying the Data Base
  1195.        SELECT Command
  1196.        The SELECT command is used for displaying or printing data from
  1197.        one relation.  It has many options.  To print all the data from a
  1198.        relation:
  1199.         SELECT ALL FROM relname
  1200.        To print selected attribute values from all rows in a relation:
  1201.         SELECT attname1 [  attname2 ... attnamen ] FROM relname
  1202.        The above command will print up to 20 attributes in any order.
  1203.        The number of attributes is limited by space available in a line.
  1204.        As a rule of thumb, 7 attributes may be selected when running at
  1205.        an 80 character interactive terminal and 11 when running in the
  1206.        batch mode or at an 132 character terminal.
  1207.        For variable length attributes or for attributes of fixed length
  1208.        that would otherwise not fit on aline alone or together with
  1209.        other attributes, you may format the output using the optional
  1210.        field width control:
  1211.         SELECT attname1 [ =fw1 ] [ attname2 [ =fw2 ] ... ] +
  1212.         FROM
  1213.        fwi is the output field width for attnamei.  For a text type
  1214.        attribute, fwi is the width of the output paragraph in number
  1215.        of characters, for other attribute types it is the number of
  1216.        values.  When the field width option is used, RIM will use as
  1217.        many output lines as required for each row.
  1218.        Defaults are rather complex.  For a fixed length attribute,
  1219.        other than matrix, no paragraphing is attempted.  For a fixed
  1220.        length matrix, the default paragraph width is a full row.  The
  1221.        system will use the field width required to display the value(s)
  1222.        of the attribute.  For a variable length attribute of type TEXT,
  1223.        the default is a display of a maximum of 40 characters with
  1224.        paragraphing.  For variable length attributes of types REAL, INT,
  1225.        DOUB, the default is 4 elements with truncation.  For variable
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.                           Page 21
  1243.  
  1244.                               
  1245.                               
  1246.  
  1247.  
  1248.        length vector type attributes, the default is 4 elements with
  1249.        paragraphing (no truncation).  For variable length matrix at-
  1250.        tributes the default is 4 elements with paragraphing (no trun-
  1251.        cation).  A row starts on a new line.
  1252.        Whether field width is specified or not, the system will display
  1253.        the dimension of variable length vectors and matrices using one
  1254.        of the output positions.  However, should you specify a width of
  1255.        one for such an attribute, the row and column dimensions will not
  1256.        be displayed.
  1257.        Further information about line width, number of lines per page,
  1258.        defaults and user specifications is given in section 2.1.10 as
  1259.        part of the RIM report writing features.
  1260.        When paragraphing TEXT type attributes, RIM will identify sub-
  1261.        strings of text separated by blanks.  The substring is placed
  1262.        on the current line if there is space available.  If the current
  1263.        line contains less than four characters, the number of characters
  1264.        that fit on the line are removed from (the front of) the substring
  1265.        and put on the line (without hyphen) and continued on the next
  1266.        line.  If the current line contains more than four characters,
  1267.        the substring will be placed on the next line.
  1268.        Examples of SELECT command:
  1269.        SELECT ivecvar FROM rel1
  1270.                DIM     IVECVAR
  1271.        -----------------------------------
  1272.                 7        1     2       3
  1273.                          4     5       6
  1274.                          7
  1275.                 1       10
  1276.        SELECT imatvv FROM rel1
  1277.               ROW    COL    IMATVV
  1278.        ---------------------------------------
  1279.                2      5      11     12     13
  1280.                              14     15
  1281.                              21     22     23
  1282.                              24     25
  1283.                1      1      11         
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.                           Page 22
  1302.  
  1303.                               
  1304.                               
  1305.  
  1306.  
  1307.        SELECT textv = 9 FROM rel 1
  1308.        TEXTV
  1309.        ------------
  1310.        THIS IS
  1311.        AN EXAMPL
  1312.        E OF
  1313.        WRAPAROUN
  1314.        D OF TEXT
  1315.        THIS IS
  1316.        ANOTHER
  1317.        EXAMPLE
  1318.        OF TEXT
  1319.        The attribute name attnamei may be replaced by its correspond-
  1320.        ing attribute number (attnum1).  The attribute number is deter-
  1321.        mined by the position of the attribute in the relation.  Specific
  1322.        elements of a vector or a matrix may also be designated. The general
  1323.        form of the unconditional SELECT command is:
  1324.        SELECT {attname1 [ = fw1 ]} [attname2 [= fw2] ...] +
  1325.                attnum1 [ = fw1 ]
  1326.                attname1(i)
  1327.                attname1(i,j)
  1328.                attnum1(i)
  1329.                attnum1(i,j)
  1330.                ALL
  1331.        FROM  relname
  1332.        To print all attributes from a relation where certain conditions
  1333.        are met:
  1334.          SELECT ALL FROM relname WHERE condition1 [ {AND} condition2 ...]
  1335.                                                       OR
  1336.        Up to ten conditions may be combined using the Boolean operators
  1337.        AND/OR.  The conditions are combined from left to right.
  1338.        Each condition may be one of the following forms:
  1339.         attname EXISTS
  1340.         attname FAILS
  1341.         attname EQ MAX
  1342.         attname EQ MIN
  1343.         attname EQ value
  1344.         attname EQS value
  1345.         attname NE value        
  1346.         attname GT value
  1347.         attname GE value
  1348.         attname LT value
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.                           Page 23
  1361.  
  1362.                               
  1363.                               
  1364.  
  1365.  
  1366.         attname LE value
  1367.         attname EQ list
  1368.         attname NE list
  1369.         attname1 EQA attname2
  1370.         attname1 NEA attname2
  1371.         attname1 GTA attname2
  1372.         attname1 GEA attname2
  1373.         attname1 LTA attname2
  1374.         attname1 LEA attname2
  1375.         ROWS EQ rownumber
  1376.         ROWS NE rownumber
  1377.         ROWS LT rownumber
  1378.         ROWS LE rownumber
  1379.         ROWS GE rownumber
  1380.         ROWS GT rownumber
  1381.         ROWS EQ list
  1382.         ROWS NE list
  1383.         LIMIT EQ number
  1384.        where:  EQ  = Equals     
  1385.                EQS = Contains the text string
  1386.                NE  = Not equals
  1387.                GT  = Greater than
  1388.                GE  = Greater than or equal to
  1389.                LT  = Less than
  1390.                LE  = Less than or equal to
  1391.                EQA = Equals attribute
  1392.                NEA = Not equals attribute
  1393.                GTA = Greater than attribute
  1394.                GEA = Greater than or equal to attribute
  1395.                LTA = Less than attribute
  1396.                LEA = Less than or equal to attribute
  1397.                MAX = Maximum value
  1398.                MIN = Minimum value
  1399.        Attname, attname1, attname2 may refer to an element of a vector
  1400.        or a matrix.
  1401.        When an attribute has been assigned a value, then EXISTS will
  1402.        qualify those attributes.  If an attribute has not been assigned
  1403.        a value, but was loaded with -0-, then FAILS will qualify those
  1404.        attributes.
  1405.        MAX and MIN comparison can only be made for integer, real and
  1406.        double precision attributes of fixed length equal to 1.
  1407.        Value in a comparison statement must follow the rules of section
  1408.        2.1.3 for vectors and matrices, i.e., if the attribute is of
  1409.        variable length or dimension, parentheses must be used to input
  1410.        a vector or a matrix value or a list of vector and matrix values.
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.                           Page 24
  1420.  
  1421.                               
  1422.                               
  1423.  
  1424.  
  1425.        EQS applies to text strings only.  In such a comparison, value is
  1426.        a text string and the comparison is true if value is found as a
  1427.        substring anywhere within the attribute for which comparison is
  1428.        requested.
  1429.        NE comparison when applied to matrices or vectors is true if the
  1430.        length or dimension is different from the length or dimension of
  1431.        your specified comparison vector or matrix or if any vector or
  1432.        matrix elements differs.
  1433.        GT and LT comparisons for vector and matrix attributes are
  1434.        "lexicographical", i.e. a comparison is made element by
  1435.        element (columnwise for matrices) and continued until a true
  1436.        or false condition is detected.  If no such condition is detected
  1437.        after the last element is checked, a false condition is assumed.
  1438.        Comparison is made only for vectors and matrices of the same
  1439.        sizes as comparison data.
  1440.        GE and LE comparisons for vector and matrix attributes are similar
  1441.        to GT and LT comparisons except it continues if an equal condi-
  1442.        tion is detected and if no condition is detected after the last
  1443.        element is checked, a true condition is assumed.
  1444.        Comparison rules for vector attributes apply also to real, integer
  1445.        and double precision attributes of fixed or variable length.
  1446.        A list is a simple list (a1, a2, a3,...,an) of values.
  1447.        The comparison key words ending in A are used when comparing
  1448.        the value of one attribute to the value of another attribute
  1449.        in the same row of the relation.
  1450.        ROWS refer to row numbers in a relation.  Note that a relation is
  1451.        loaded in input row order but that subsequent operations
  1452.        (changes) to the data base may cause the order of the rows to
  1453.        change.
  1454.        When the LIMIT clause is used, only the first LIMIT number of
  1455.        the rows that otherwise would qualify will actually qualify.
  1456.        Processing the WHERE condition can be speeded up greatly if
  1457.        index processing is used.  Index processing involves using
  1458.        the indices created for KEY attributes rather than looking
  1459.        at each row of a relation to find the rows qualified by
  1460.        the WHERE conditions.  Index processing will be used when
  1461.        the following are all true:
  1462.         1)   The last condition uses an attribute which is KEY
  1463.         2)   The last condition uses EQ
  1464.         3)   The last condition is not combined by OR with the
  1465.                     other conditions.
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.                           Page 25
  1479.  
  1480.                               
  1481.                               
  1482.  
  1483.  
  1484.        The output can be sorted by specifying sorting attributes.  The
  1485.        sorting order is user specified with default low to high.
  1486.         SELECT ... FROM relname
  1487.         SORTED BY attname1 [ {=A}  ] { attname2 [={A} ] ...] +
  1488.                                D                   D
  1489.         [ WHERE ...]
  1490.        A and D stands for ascending and descending order respectively.
  1491.        If a sort on more than one attribute is requested, the output will
  1492.        first be ordered according to the first mentioned attribute.  In
  1493.        case there are duplicates for the first sort attribute, these will
  1494.        be ordered by the second sort attribute, duplicates within this by
  1495.        the third and so on.  A maximum of 5 sorts may be specified.  When
  1496.        multiple attributes are used, ascending and descending order may
  1497.        be used in any combination.  Variable length attributes may not be
  1498.        used as sort attributes.  When fixed length attributes are used as
  1499.        sort attributes, only the first 20 characters and the first value
  1500.        is used for sort.
  1501.        All these options can be described using the following general
  1502.        syntax:
  1503.         SELECT {attname1 [ = fw1 ] [...attname [ = fwn ] ] } +
  1504.                        attnum1...
  1505.                        attname1(i)...
  1506.                        attname1(i,j)...
  1507.                        attnum1(i)...
  1508.                        attnum1(i,j)...
  1509.                        ALL
  1510.         FROM relname +
  1511.         [SORTED BY attname [{=A} ]... ] +
  1512.                               D
  1513.         [WHERE condition1 [{AND} condition2 ... ]]
  1514.                             OR
  1515.        If the sum of the lengths (or fwi) of the attributes requested
  1516.        exceeds the line capacity, the data line will be truncated.
  1517.        See section 2.1.10 for further expanation of line width control.
  1518.        TALLY Command
  1519.        The TALLY command prints a tally for an attribute giving each
  1520.        unique value and the number of times it occurs in a relation.
  1521.        The tally is ordered ascending or descending per user input.
  1522.        Default is ascending.  The WHERE clause is optional and uses
  1523.        the same syntax as in the SELECT command.
  1524.         TALLY attname [{=A}] FROM relname [ WHERE ... ]
  1525.                          D
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.                           Page 26
  1538.  
  1539.                               
  1540.                               
  1541.  
  1542.  
  1543.        Examples of SELECT and TALLY commands:
  1544.           SELECT ALL FROM AIRPLANE
  1545.           SELECT MODEL FROM AIRPLANE
  1546.           SELECT ALL FROM AIRPLANE WHERE WEIGHT GT 100000.
  1547.           *8 AND NUMPASS LT 200
  1548.           SELECT AGE FROM PEOPLE WHERE NAME EQ BOB
  1549.           SELECT ALL FROM AIRPLANE SORTED BY MODEL=D
  1550.           TALLY MODEL FROM FLIGHTS
  1551.           TALLY MODEL FROM FLIGHTS WHERE CARRIER EQ UNITED
  1552.           SELECT ALL FROM DIMENS WHERE HEIGHT GTA WIDTH
  1553.           SELECT FILE TITLE=4 OWNER FROM PFDATA
  1554.        2.1.5  Commands for Querying the Schema
  1555.        When you use any of these commands, RIM will display only
  1556.        the data you are authorized to access according to your
  1557.        current user password.
  1558.        LISTREL Command
  1559.        The purpose of LISTREL is to provide you with information
  1560.        about the relations in the data base.
  1561.        There are three formats for the LISTREL command.  The first
  1562.        consists of simply entering:
  1563.         LISTREL
  1564.        Using LISTREL in this fashion provides you with a list of
  1565.        all relations currently defined in your data base.  If you
  1566.        wish to display the definition of a specific relation, then
  1567.        the syntax is:
  1568.         LISTREL relname
  1569.        The use of LISTREL in this manner also provides a count of
  1570.        the number of rows defined for the specified relation.
  1571.         LISTREL ALL
  1572.        This command (restricted by user password) will display the
  1573.        definitions of all relations in the data base, including
  1574.        counts of the number of defined rows in each relation.
  1575.        EXHIBIT Command
  1576.        The purpose of the EXHIBIT command is to allow you to query
  1577.        the RIM dictionary to obtain the names of all relations
  1578.        having a specific set of attributes.  For example, if you
  1579.        want to know which relations contain the attribute attname
  1580.        you would enter:
  1581.         EXHIBIT attname
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.                           Page 27
  1597.  
  1598.                               
  1599.                               
  1600.  
  1601.  
  1602.        You would then obtain either a list of the relations having
  1603.        this attribute, or a message indicating that this attribute
  1604.        was not found in any relations in the data base.
  1605.        The EXHIBIT command also allows you to query fro a list of
  1606.        attributes(maximum of 10).  Suppose that you wanted to know
  1607.        which relations contian both attname1 and attname2.  The
  1608.        command would then be:
  1609.         EXHIBIT attname1 attname2
  1610.        The general syntax of this command is:
  1611.         EXHIBIT attname1 [attname2 ... attnamen ]
  1612.        PRINT RULES Command
  1613.        This command can be used when the current user password
  1614.        matches the owner password of the data base definition.  To
  1615.        obtain a complete list of all constraint rules enter:
  1616.         PRINT RULES
  1617.        2.1.6  Computation Command
  1618.        COMPUTE Command
  1619.        The COMPUTE command is used to compute simple functional
  1620.        values of an attribute.  A WHERE clause is optional and uses
  1621.        the same syntax as is used in the SELECT command.
  1622.          COMPUTE {COUNT} attname FROM relname [WHERE... ]
  1623.                    MAX
  1624.                    MIN
  1625.                    AVE
  1626.                    SUM
  1627.        There are some restrictions as to the type and word length
  1628.        of the attribute when using these computed functions.  All
  1629.        of these functions exclude any -0- values when making their
  1630.        computations.  The following table describes the attribute
  1631.        type and length restrictions for each function:
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.                           Page 28
  1656.  
  1657.                               
  1658.                               
  1659.  
  1660.  
  1661.        FUNCTION  ATTRIBUTE TYPE       ATTRIBUTE LENGTH
  1662.        COUNT     any                  any
  1663.        MIN       any of fixed length  1 for non-text, <= for text
  1664.        MAX       any of fixed length  1 for non-text, <= for text
  1665.        AVE       int, real, double    1
  1666.        SUM       int, real, double    1
  1667.        Examples of COMPUTE command:
  1668.            COMPUTE AVE NUMPASS FROM FLIGHTS
  1669.            COMPUTE MAX WEIGHT FROM FLIGHTS WHERE NUMPASS LT 100
  1670.            COMPUTE COUNT NAME FROM PEOPLE WHERE AGE GT 30
  1671.        2.1.7  Data Base Modification Commands
  1672.        These commands are used to change the contents of the data
  1673.        base.  a modify or owner password correlation is required in
  1674.        order to use these commands.
  1675.        CHANGE Command
  1676.        The CHANGE command is used to change the value of an
  1677.        attribute in a relation where certain conditions are met.
  1678.           CHANGE {attname1}    TO value [IN relname] WHERE ...
  1679.                   attname(i)
  1680.                   attname(i,j)
  1681.        Value has the same form as described in Section 2.1.3.  The
  1682.        WHERE clause is required and uses the same syntax as in the
  1683.        SELECT command.  If the relation name is not specified, the
  1684.        attribute is changed in all relations where the attribute is
  1685.        found and the conditions are met.
  1686.        DELETE ROW Command
  1687.        The DELETE ROW command is used to delete selected rows in a
  1688.        relation.
  1689.         DELETE ROW FROM relname WHERE ...
  1690.        The name of the relation must be specified as well as a
  1691.        WHERE clause.  The syntax for the WHERE clause is the same
  1692.        as in the SELECT command.
  1693.        DELETE DUPLICATES Command
  1694.        This command is used to remove any duplicate rows from a
  1695.        relation.  It is particularly useful on relations which have
  1696.        been created by any of the relational algebra commands
  1697.        (JOIN, INTERSECT, SUBTRACT, or PROJECT).  The syntax for
  1698.        this command is:
  1699.        DELETE DUPLICATES [attname1, attname2,...] from relname
  1700.        Duplicates are checked only for the specified (combination
  1701.        of) attribute(s).  Default is to check the complete row (all
  1702.        attributes).
  1703.        Examples of CHANGE, DELETE, and DELETE DUPLICATES commands:
  1704.           CHANGE NUMPASS TO 320 IN AIRPLANES WHERE MODEL EQ 747SP
  1705.           CHANGE NAME TO ROBERT WHERE NAME EQ BOB
  1706.           DELETE ROW FROM AIRPLANES WHERE MODEL EQ DC10
  1707.           CHANGE STABILITY TO LOW IN DIMENSIONS WHERE HEIGHT GTA
  1708.        WIDTH
  1709.           DEL DUP NUMPASS FRO AIRPLANES
  1710.        2.1.8  Schema Modification Commands
  1711.        These commands are used to change the data base schema
  1712.  
  1713.  
  1714.                           Page 29
  1715.  
  1716.                               
  1717.                               
  1718.  
  1719.  
  1720.        definition.  Except for the CHANGE OWNER command, a modify
  1721.        or owner password correlation is required in order to use
  1722.        these commands.
  1723.        CHANGE OWNER Command
  1724.        The CHANGE OWNER command is used to change the name of the
  1725.        data base password.  Only the current owner is allowed to
  1726.        use this command.
  1727.         CHANGE OWNER TO newowner
  1728.        RENAME Attribute Command
  1729.        The RENAME attribute command is used to change the name of
  1730.        an attribute in the data base definition (schema).
  1731.           RENAME attname1 TO attname2 [IN relname]
  1732.        THe old name is attname1 and the new name is attname2.  if
  1733.        the name of the relation is not specified, then the name
  1734.        change takes place in every relation that contains the old
  1735.        name.  If the relname is specified and attname1 occurs more
  1736.        than once, the first occurence will be changed.
  1737.        RULES and KEY(s) defined for attname1 will automatically be
  1738.        redefined to apply to attname2.
  1739.        Examples of RENAME command:
  1740.           RENAME MODEL TO VERSION IN AIRPLANES
  1741.           RENAME NUMPASS TO CAPACITY
  1742.  
  1743.  
  1744.  
  1745.  
  1746.  
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.                           Page 30
  1774.  
  1775.                               
  1776.                               
  1777.  
  1778.  
  1779.        BUILD KEY Command
  1780.        This command is used to change an attribute from non-key to
  1781.        KEY.  An index is built from existing data values by amking
  1782.        a pass through current rows of the specified relation.  This
  1783.        index is then used and maintained just as if the attribute
  1784.        had been declared to be KEY in the original data base
  1785.        definition.
  1786.         BUILD KEY FOR attname IN relname
  1787.        Keys are not transferred to relations created by relational
  1788.        algebra commands.
  1789.        DELETE KEY Command
  1790.        This command is used to change an attribute from KEY to
  1791.        non-key.  The index file for that attribute is deactivated
  1792.        and no longer maintained or used once the attribute  has
  1793.        been changed to non-key with this command.
  1794.         DELETE KEY FOR attname IN relname
  1795.        CHANGE PASSWORD Command
  1796.        The read or modify passwords may be changed by using the
  1797.        following command:
  1798.         CHANGE {RPW} TO newpass FOR relname
  1799.                 MPW
  1800.        RENAME RELATION Command
  1801.        You may change the name of a relation by using the following
  1802.        command:
  1803.         RENAME RELATION relname TO newname
  1804.        RULES applying to relname will automatically apply to
  1805.        newname.
  1806.        REMOVE Command
  1807.        The REMOVE command is used to remove a relation definition
  1808.        and its data from the data base.
  1809.         REMOVE relname
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.                           Page 31
  1833.  
  1834.                               
  1835.                               
  1836.  
  1837.  
  1838.        2.1.9  Relational Algebra Command
  1839.        These commands allow you to create new relations from
  1840.        existing relations.  All relational algebra commands require
  1841.        modify permission on the constituent relations.
  1842.        INTERSECT Command
  1843.        The purpose of the INTERSECT command is to allow you to
  1844.        combine the rows of relations into a third relation based on
  1845.        common values within a set of specified attributes.  The
  1846.        syntax of the INTERSECT command is:
  1847.           INTERSECT relname1 WITH relname2 FORMING relname3 +
  1848.           [USING attname1 [attname2 ... attnamen]]
  1849.        The USING clause identifies the attributes that form the
  1850.        resulting relation. The attributes used in the INTERSECT
  1851.        process are the subset of those identified by the USING
  1852.        clause which are present in both relations.
  1853.        For example, assume that you have the following two
  1854.        relations defined:
  1855.                  REL-1                          REL-2
  1856.        NAME     DEPT      JOB        DEPT       JOB          PAY        
  1857.        -----    -----     -----      -----      -----        ----
  1858.        BOB      A         ENGR       A          ENGR         800
  1859.        JIM      C         SUPR       B          ENGR         450
  1860.        BOB      B         ENGR       C          ENGR         750
  1861.        RAY      C         ENGR
  1862.        You may INTERSECT two relations restricted to specific sets
  1863.        of attributes (the USING clause) or use all attributes of
  1864.        both relations.  In either case RIM will identify the common
  1865.        attributes and use the common values within these attributes
  1866.        to identify the conditions for intersect generation.
  1867.        Suppose you want to INTERSECT the two relations using
  1868.        attributes DEPT, NAME, and JOB.  The command for this would
  1869.        be:
  1870.        INTERSECT REL-1 WITH REL-2 FORMING REL-3 USING DEPT NAME JOB
  1871.        The result would be the new relation REL-3 shown on the next
  1872.        page.
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.                           Page 32
  1892.  
  1893.                               
  1894.                               
  1895.  
  1896.  
  1897.                             REL-3
  1898.                    DEPT     NAME      JOB
  1899.                    ----     -----     -----
  1900.                    A        BOB       ENGR
  1901.                    B        BOB       ENGR
  1902.                    C        RAY       ENGR
  1903.        In this example there are no duplicate rows in REL-3.
  1904.        However, it is possible that the intersect command will
  1905.        create duplicate rows.  Since, in general, duplicate rows
  1906.        are not desired in a relation, they can be removed with the
  1907.        DELETE DUPLICATES command.  Note also that by specifying
  1908.        which attributes the INTERSECT is using, you restrict the
  1909.        number of attributes in the resulting relation to only those
  1910.        specified in the USING clause.
  1911.        Suppose you want RIM to use all the attributes in the two
  1912.        relations.  In this instance you would enter:
  1913.           INTERSECT REL-1 WITH REL-2 FORMING REL-4
  1914.        The result would be REL-4 consisting of the attributes
  1915.        NAME, DEPT, JOB, and PAY, shown below in the resulting rows:
  1916.                              REL-4
  1917.                   NAME    DEPT     JOB      PAY
  1918.                   -----   -----    ----     ---
  1919.                   BOB     A        ENGR     800
  1920.                   BOB     B        ENGR     450
  1921.                   RAY     C        ENGR     750
  1922.        There may be situations where an INTERSECT is impossible to
  1923.        perform.  These include:
  1924.           1)  The name of the resulting relation already exists
  1925.           2)  The two relations have no common attributes
  1926.           3)  The attributes in the USING clause do not exist in
  1927.               the relation being intersected
  1928.           4)  The resulting relation exceeds 1021 words
  1929.        If any of the above situations is encountered, you are
  1930.        warned of the problem and the INTERSECT command processing
  1931.        is stopped.  In the case where common attribute names exist
  1932.        but there are no matching values, the operation will be
  1933.        successful resulting in an empty relation (0 orws).
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.                           Page 33
  1951.  
  1952.                               
  1953.                               
  1954.  
  1955.  
  1956.        The INTERSECT command is a powerful tool and may be used as
  1957.        a step towards satisfying queries which require attributes
  1958.        from more than on relation.
  1959.        JOIN Command
  1960.        The JOIN command is a function operating on two relations to
  1961.        form a third relation.  The purpose of the JOIN is to
  1962.        juxtapose two relations based on a specified attribute from
  1963.        each.  The result of the JOIN command is a third relation
  1964.        containing all of the attributes from both relations.  Rows
  1965.        are generated in the new relation as a result of the
  1966.        comparison conditions between attributes being satisfied.
  1967.        The syntax of the JOIN command is:
  1968.           JOIN relname1 USING  attname1 WITH relname 2 USING +
  1969.           attname2 FORMING relname3 [ WHERE {EQ} ]
  1970.                                              NE
  1971.                                              GT
  1972.                                              GE
  1973.                                              LT
  1974.                                              LE
  1975.        The WHERE clause of the JOIN command is different form the
  1976.        WHERE clause of the SELECT command.  In JOIN it applies only
  1977.        to the comparison of the two attributes upon which JOIN is
  1978.        based.  If the WHERE clause is omitted (default), EQ is
  1979.        used.
  1980.        The value of attname1 in the first row of relname11 is
  1981.        compared to all the values of attname2.  Rows which qualify
  1982.        are generated in relname3.  The value of attname1 in the
  1983.        second row of relname1 is compared to all the values of
  1984.        attname2, etc.  Each row from relname1 may generate 0, 1, 2,
  1985.        or more rows in relname3.
  1986.        For example, consider the relations REL1 AND REL2:
  1987.                  REL1                     REL2
  1988.         A        B        C            D        E
  1989.        ---      ---      ---          ---      ---
  1990.         1        2        3            3        1
  1991.         4        5        6            6        2
  1992.         7        8        9
  1993.        The following JOIN command would produce the result shown.
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.                           Page 34
  2010.  
  2011.                               
  2012.                               
  2013.  
  2014.  
  2015.                JOIN REL1 USING B WITH REL2 USING D +
  2016.                FORMING REL3 WHERE LT
  2017.                         REL3
  2018.         A        B         C          D         E
  2019.        ---      ---       ---        ---       ---
  2020.         1        2         3          3         1
  2021.         1        2         3          6         2
  2022.         4        5         6          6         2
  2023.        The JOIN will function correctly on any comparison providing
  2024.        that you compare attributes of the same data type.  All
  2025.        attribute names in the resultant relation must be unique in
  2026.        order for you to obtain accurate results from subsequent
  2027.        commands using the relation.  Any duplicate attribute names
  2028.        should be change using the RENAME command before doing
  2029.        queries or updates to the new relation.  In the case of
  2030.        duplicate attribute names, RENAME when applied to a specific
  2031.        relation will change the first attribute name.
  2032.        There may be situations where a JOIN is impossible to
  2033.        perform.  These may include:
  2034.           1)  The name of the resulting relation already exists
  2035.           2)  The attribute in the USING clause does not exist in
  2036.               the relation being joined
  2037.           3)  The attributes being compared are different data
  2038.               types or lengths
  2039.           4)  An attribute in either of the relations greater than
  2040.               300 computer words
  2041.           5)  The resulting relation exceeds 1021 words
  2042.        If any of the above situations are encountered you are
  2043.        warned of the problem and the JOIN command processing is
  2044.        stopped.
  2045.        PROJECT Command
  2046.        The function of a PROJECT command is to create a new
  2047.        relation as a subset of an existing relation.  You may want
  2048.        to create the new relation from the old one by removing
  2049.        attributes, removing rows, or both.  The syntax for the
  2050.        PROJECT command is:
  2051.        PROJECT relname1 FROM relname2 USING {attname1...attnamen} +
  2052.                                              ALL
  2053.        [WHERE ...]
  2054.        The WHERE clause is optional but it is specified, it has the
  2055.        same syntax as in the SELECT command.  You are required to
  2056.        specify which attributes are to be retained in the new
  2057.        relation.  The old relation is relname2 and the new relation
  2058.        is relname1.
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.                           Page 35
  2069.  
  2070.                               
  2071.                               
  2072.  
  2073.  
  2074.        For example consider the following relation:
  2075.                                PEOPLE
  2076.        EMPNUM     EMPNAME      BOSS      POSITION        GROUP
  2077.        ------     -------      ------    --------        ------
  2078.         2181      JONES        SMITH     MANAGER         AADE
  2079.         3964      ERICKSON     BUSS      APPL-MGR        ACC
  2080.         6543      GRAY         PARKER    ASST-MGR        PHOTO
  2081.         2233      SCHMITZ      BUSS      APPL-MGR        ACC
  2082.        To create a new relation with EMPNAME and GROUP as the only
  2083.        attributes and where now rows contain PARKER as BOSS enter
  2084.        the command:
  2085.            PROJECT TEMP1 FROM PEOPLE USING EMPNAME GROUP +
  2086.            WHERE BOSS NE PARKER
  2087.                                TEMP1
  2088.                      EMPNAME         GROUP
  2089.                      -------         ------
  2090.                      JONES           AADE
  2091.                      ERICKSON        ACC
  2092.                      SCHMITZ         ACC
  2093.        The PROJECT command is useful to reduce the size of a
  2094.        relation when only a subset of the data is needed.  RIM will
  2095.        not eliminate any duplicate rows formed in the new relation.
  2096.         You must do that yourself with the DELETE DUPLICATES
  2097.        command.
  2098.        There may be situations where a PROJECT is impossible to
  2099.        perform.  These include:
  2100.           1)  The name of the resulting relation already exists
  2101.           2)  An attribute in the USING or WHERE clause is not in
  2102.               the relation
  2103.        SUBTRACT Command
  2104.        The SUBTRACT command is similar to the PROJECT command in
  2105.        that the new relation is a subset of an existing relation.
  2106.        The rows, however, are selected based on the data in another
  2107.        relation rather than on a WHERE clause within the same
  2108.        relation.  Where the INTERSECT command looked for rows of
  2109.        two relations which matched up, the SUBTRACT command does
  2110.        just the opposite.  It looks for rows in the relation which
  2111.        do not match any rows in the other relation.  The syntax for
  2112.        the SUBTRACT command is:
  2113.          SUBTRACT relname1 FROM relname2 FORMING relname3 +
  2114.          [USING attname1 [attname2 ... attnamen]]
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.                           Page 36
  2128.  
  2129.                               
  2130.                               
  2131.  
  2132.  
  2133.        All rows in the new realtion will come from relname2.  If
  2134.        the USING clause is not specified, then all attributes of
  2135.        relname2 will be attributes of relname3.  Relname1 is the
  2136.        relation that rows of relname2 are checked against for
  2137.        matches.  If a USING clause is specified at least one of the
  2138.        attributes in the clause must be common to both relations.
  2139.        As an example consider these two example relations:
  2140.                 EMPDATA                     BOSSDATA
  2141.        EMPNUM   EMPNAME   BOSS     BOSS     POSITION    GROUP
  2142.        ------   -------   ------   ------   --------    --------
  2143.         2181    JONES     SMITH    SMITH    MANAGER     AADE
  2144.         3964    ERICKSON  BUSS     PARKER   ASST-MGR    PHOTO
  2145.         6543    GRAY      PARKER   BUSS     APPL-MGR    ACC
  2146.        The following command will produce a new relation from
  2147.        EMPDATA:
  2148.         SUBTRACT BOSSDATA FROM EMPDATA FORMING TEMP USING +
  2149.         EMPNAME BOSS
  2150.        The resulting relation TEMP would contain only one row:
  2151.                                TEMP
  2152.                          EMPNAME  BOSS
  2153.                          -------  -----
  2154.                          BROWN    WHITE
  2155.        There may be situations where a SUBTRACT is impossible to
  2156.        perform. These include:
  2157.           1)  The name of the resulting relation already exists
  2158.           2)  The relations have no common attributes
  2159.           3)  The number of attributes in the USING clause is
  2160.               greater than the number in relname1
  2161.           4)  An attribute in the USING clause is not in the
  2162.               relations
  2163.        2.1.10  Report Generation Commands
  2164.        These commands establish a limited report generation
  2165.        capability.
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186.                           Page 37
  2187.  
  2188.                               
  2189.                               
  2190.  
  2191.  
  2192.        NEWPAGE Command
  2193.        This command causes a new page to be issued.  It applies to
  2194.        batch output only.  The command is:
  2195.         NEWPAGE
  2196.        BLANK Command
  2197.        Blank lines can be inserted into the output stream by using
  2198.        the command:
  2199.         BLANK n
  2200.        where n is the number of blank lines written.
  2201.        TITLE Command
  2202.        The command:
  2203.         TITLE "titlestring"
  2204.        causes the text "titlestring" to be printed, centered on the
  2205.        line.  If the length of "titlestring" is longer than current
  2206.        lines width it will be truncated and a warning issued.
  2207.        DATE Command
  2208.        The command:
  2209.         DATE
  2210.        will cause the current date to be printed, centered on the
  2211.        line.
  2212.        LINES Command
  2213.        This command controls the number of lines per page
  2214.        (exclusive of title.)  The command is:
  2215.         LINES n
  2216.        will establish page size to n lines.  Default is 56.
  2217.        WIDTH Command
  2218.        This command controls the width of a printed line.  The
  2219.        command:
  2220.         WIDTH n
  2221.        will establish a line width of n characters.  Default is 78
  2222.        if output is to a terminal, 132 if output is to a batch
  2223.        printer.  If n is specified to be less than 20, 20 will be
  2224.        used.
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.                           Page 38
  2246.  
  2247.                               
  2248.                               
  2249.  
  2250.  
  2251.        2.1.11  Communication Command
  2252.        UNLOAD Command
  2253.        The UNLOAD command permits you to off-load a portion or all
  2254.        of your data base onto a previously designated file (see
  2255.        OUTPUT command).  The file will contain 80 characters text
  2256.        records and can be read by RIM as an input file on the same
  2257.        or on a different computer using the INPUT command.  Default
  2258.        file name is for006.  The syntax of this command is:
  2259.         UNLOAD [dbname = newname] {ALL   } +
  2260.                                           SCHEMA
  2261.                                           DATA
  2262.                [relname1 [ mpw1 ] relname2 [ mpw2 ] ... ]
  2263.        Specifying SCHEMA will off-load the schema of your data
  2264.        base, DATA will off-load the data of your data base and ALL
  2265.        will off-load both schema and data.
  2266.        Optionally, you may rename your data base by entering dbname
  2267.        =newname where dbname is the name of the currently open data
  2268.        base.  By specifying relation names, you will only off-load
  2269.        data and/or schemas for the specific relations.  The modify
  2270.        password does not allow you to modify access to the
  2271.        relation.
  2272.        There are implicit password restrictions to the unload
  2273.        command as follows:  If you are the data base owner, you may
  2274.        off-load any data and/or schema.  If you are not the owner,
  2275.        you may off-load data and/or schema for the relations for
  2276.        which you have modify access permission.  Your password
  2277.        becomes the owner of the off-loaded data base.  Rules, if
  2278.        any, will only be off-loaded if you are the owner of the
  2279.        data base and you have used the option ALL.
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.                           Page 39
  2305.  
  2306.                               
  2307.                               
  2308.  
  2309.  
  2310.        2.2  MENU MODE EXECUTION OVERVIEW
  2311.        The RIM menu mode provides you with the capability to build
  2312.        the schema for a new data base and to update an existing
  2313.        data base definition.
  2314.        The options (create, update, query, command, and exit)
  2315.        available in menu mode are shown in figure 2.2-1.
  2316.        Executions may be terminated at anytime by entering the word
  2317.        QUIT.  EXIT, in response to an input prompt, will return you
  2318.        to the top menu.  The data base will be purged following a
  2319.        QUIT command.
  2320.  
  2321.  
  2322.  
  2323.  
  2324.  
  2325.  
  2326.  
  2327.  
  2328.  
  2329.  
  2330.  
  2331.  
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.                           Page 40
  2364.  
  2365.                               
  2366.                               
  2367.  
  2368.  
  2369.                       l----------------l
  2370.                       l  BEGIN RIM 5.0 l
  2371.                       l----------------l
  2372.                              l
  2373.                              l
  2374.                     RIM COMMAND MODE
  2375.                     ENTER "MENU" FOR MENU MODE
  2376.                    R>MENU    l
  2377.                              l
  2378.                              l
  2379.                     SELECT THE EXECUTION OPTION DESIRED
  2380.                         1)  CREATE A NEW DATABASE
  2381.                         2)  UPDATE AN EXISTING DATABASE
  2382.                         3)  QUERY AN EXISTING DATABASE
  2383.                         4)  ENTER COMMAND MODE
  2384.                         5)  EXIT
  2385.                              l
  2386.           l------------------------------------------------l
  2387.           l              l             l         l         l
  2388.           l              l             l         l         l
  2389.        CREATE OPTION     l         QUERY OPTION  l       EXIT
  2390.        SECTION 2.2.1     l         SECTION 2.2.3 l   SECTION 2.1.1
  2391.                          l                       l
  2392.                     UPDATE OPTION         COMMAND MODE
  2393.                     SECTION 2.2.2         SECTION 2.1
  2394.        Figure 2.2-1 Section References for the Menu Mode Options
  2395.  
  2396.  
  2397.  
  2398.  
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.                           Page 41
  2423.  
  2424.                               
  2425.                               
  2426.  
  2427.  
  2428.        2.2.1  Data Base Creation Option
  2429.        The purpose of this option is to construct a schema by
  2430.        prompting you for the data base, owner, the names of the
  2431.        relations, their associated attributes and read/modify
  2432.        passwords.
  2433.        After compilation of the schema, you have the opportunity to
  2434.        interactively load the data base and/or query the data base.
  2435.        In the command mode, you have available the full set of RIM
  2436.        commands (section 2.1) allowing the direct definition of the
  2437.        schema using the DEFINE submodule commands and the loading
  2438.        of the data base using the LOAD submodule commands.
  2439.        2.2.2 Data Base Update Option
  2440.        With this option you may add/modify relations and/or load
  2441.        additional data into the data base.  If additional relations
  2442.        are desired, you are prompted for the names of the
  2443.        relations, their associated attributes and read/modify
  2444.        passwords.  If additional data is to be loaded, the list of
  2445.        relations in the data base is displayed and your enter the
  2446.        required data.  Removal or modification of data in the data
  2447.        base is done using the RIM data base modification commands.
  2448.        In this command mode, you have available the full set of RIM
  2449.        commands (section 2.1) allowing the direct addition of
  2450.        relations using the DEFINE submodule commands and the
  2451.        loading of data using the LOAD submodule commands.  The data
  2452.        base modification commands are used to update existing data.
  2453.        2.2.3  Query Option
  2454.        With this option you are prompted for the data base name.
  2455.        The full set of RIM commands (section 2.1) is available to
  2456.        you for data base query.  In addition to query, all other
  2457.        data base activities are available through the RIM command
  2458.        mode.
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.  
  2480.  
  2481.                           Page 42
  2482.  
  2483.                               
  2484.                               
  2485.  
  2486.  
  2487.        2.3  RIM MENU MODE INTERACTIVE DIALOGUE
  2488.        This section presents the questions and menus that appear in
  2489.        the menu mode.  The response options are also discussed.
  2490.        The menu mode is accessed by entering MENU anytime in the
  2491.        command mode when a R> prompt is present.
  2492.        2.3.1  General Option and Questions
  2493.        SELECT THE EXECUTION OPTIION DESIRED
  2494.         1)  CREATE A NEW DATA BASE
  2495.         2)  UPDATE AN EXISTING DATA BASE
  2496.         3)  QUERY AN EXISTING DATA BASE
  2497.         4)  ENTER COMMAND MODE
  2498.         5)  EXIT
  2499.        SELECT THE UPDATE OPTION DESIRED
  2500.         1)  DEFINE ADDITIONAL RELATIONS
  2501.         2)  LOAD ADDITIONAL DATA
  2502.         The desired update option is selected by entering
  2503.         either the integer 1, allowing the definition of
  2504.         additional relations, or 2, allowing the loading of
  2505.         additional data into the data base.
  2506.        DO YOU WANT TO QUERY THE DATA BASE AT THIS TIME--Y OR N
  2507.         You may switch to the command mode for query by
  2508.         entering "Y".  If the query option is not desired
  2509.         "N".
  2510.        2.3.2  Data Base Files
  2511.        ENTER THE NAME OF THE DATA BASE
  2512.         The 1-6 character alphanumeric name assigned to the
  2513.         data base is entered here.  The name is used to
  2514.         create the names of the logical files that contain
  2515.         the data base.
  2516.  
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522.  
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534.  
  2535.  
  2536.  
  2537.  
  2538.  
  2539.  
  2540.                           Page 43
  2541.  
  2542.                               
  2543.                               
  2544.  
  2545.  
  2546.        2.3.3  Schema Definitions
  2547.        ENTER THE NAME OF THE DATA BASE
  2548.         The 1-6 character alphanumeric name assigned to the data
  2549.         base is entered here.  All future references to this data
  2550.         will be via the assigned data base name.
  2551.        ENTER THE NAME OF THE DATA BASE OWNER
  2552.         The 1-8 character alphanumeric name of the data base owner
  2553.         is entered here.  This name is used as the schema password.
  2554.         Additional schema definitions will not be permitted unless
  2555.         the user password matches the owner password assigned here.
  2556.        ENTER THE NAME ASSIGNED TO THIS RELATION
  2557.         A 1-8 character alphanumeric name assigned to the relation
  2558.         being defined.
  2559.        ENTER THE READ PASSWORD FOR THIS RELATION
  2560.         A 1-8 character alphanumeric string assigned by the owner
  2561.         as the read password for the relation being defined.  if
  2562.         the owner has assigned a read password the user password
  2563.         must match in order to query the relation.  If no read
  2564.         password is desired enter NONE.
  2565.        ENTER THE MODIFY PASSWORD FOR THIS RELATION
  2566.         A 1-8 character alphanumeric string by the owner as the
  2567.         modify password for the relation being defined.  if the
  2568.         owner has assigned a modify password the user password must
  2569.         match in order to load or modify the relation.  if no read
  2570.         password is desired enter NONE.
  2571.        ENTER THE ATTRIBUTES OF THIS RELATION
  2572.        ENTER END WHEN COMPLETE
  2573.           attname  type  length (IF >) "KEY" (IF KEY)
  2574.        Attname = 1-8 character alphanumeric string identifying
  2575.                  the attribute being defined.
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.  
  2582.  
  2583.  
  2584.  
  2585.  
  2586.  
  2587.  
  2588.  
  2589.  
  2590.  
  2591.  
  2592.  
  2593.  
  2594.  
  2595.  
  2596.  
  2597.  
  2598.  
  2599.                           Page 44
  2600.  
  2601.                               
  2602.                               
  2603.  
  2604.  
  2605.        Type =  INT    (Integer)
  2606.                REAL   (Real)
  2607.                TEXT   (Text)
  2608.                DOUB   (Double Precision)
  2609.                RVEC   (Real Vector)
  2610.                IVEC   (Integer Vector)
  2611.                DVEC   (Double Precision Vector)
  2612.                RMAT   (Real Matrix)
  2613.                IMAT   (Integer Matrix)
  2614.                DMAT   (Double Precision Matrix)
  2615.        Length = number of characters (text) or number of values
  2616.                 (all others)
  2617.        1,2,3 ..., etc., or VAR    INT
  2618.                                   TEXT
  2619.                                   REAL
  2620.                                   DOUB
  2621.                                   RVEC
  2622.                                   IVEC
  2623.                                   DVEC
  2624.             row, column or        RMAT
  2625.             row, VAR or           IMAT
  2626.             VAR, VAR              DMAT
  2627.        A variable length (or length greater than one) INT, REAL, or
  2628.        DOUB can be considered to be functionally identical to IVEC,
  2629.        RVEC, or DVEC.
  2630.        KEY = the word key indicates the attribute is key.
  2631.        Example:  To define a text string attribute (TEXTST) of 60
  2632.        characters, a real attribute (TEXTST) of 60 characters, a
  2633.        real attribute (REAL1), an integer key attribute (INT-1),
  2634.        and a real matrix with dimensions 6x8 (MAT68), the following
  2635.        entries would be made:
  2636.         R> TEXTST TEXT 60
  2637.         R> REAL1 REAL
  2638.         R> INT-1 INT KEY
  2639.         R> MAT68 RMAT 6,8
  2640.        To end the definition of the attributes for this relation,
  2641.        the word "END" is entered.
  2642.        DO YOU HAVE ADDITIONAL RELATIONS TO DEFINE--Y OR N
  2643.          Additional relations may be defined by entering the
  2644.          character "Y".  If no additional relations are to be
  2645.        defined at this time, enter "N".
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.  
  2655.  
  2656.  
  2657.  
  2658.                           Page 45
  2659.  
  2660.                               
  2661.                               
  2662.  
  2663.  
  2664.        2.3.4  Data Base Loading
  2665.        DO YOU WANT TO LOAD THE DATA BASE--Y OR N
  2666.         The data base is available for data loading if desired.
  2667.         Enter "Y" if you want to load the data base at this time.
  2668.         Enter "N" if no data is to be loaded.
  2669.        SELECT THE RELATION TO BE LOADED
  2670.         The relations defined in the data base will be listed.  You
  2671.         select the relation to be loaded by entering the integer
  2672.         corresponding to the desired relation.
  2673.        ENTER THE MODIFY PASSWORD FOR THIS RELATION
  2674.         No data loading will be allowed for the selected relation
  2675.        unless the proper modify password is entered here.
  2676.        ENTER THE ATTRIBUTE VALUES IN THE SPECIFIED SEQUENCE
  2677.        ENTER END WHEN COMPLETE
  2678.         Entering data values at this point loads the data base.
  2679.         The values are entered in the order indicated and the value
  2680.         entered must correspond to the attribute type.  If a text
  2681.         string contains embedded blanks, or commas, or if entirely
  2682.         numeric text is entered, it must be enclosed in quotation
  2683.         marks .  Unused trailing characters in fixed length text
  2684.         strings will be blank filled.  It is recommended that
  2685.         leading blanks not be used in text strings.  If vectors or
  2686.         matrices are loaded, all values must be specified. Enter
  2687.         "END" when data loading is complete.  It is recommended
  2688.         that large data bases and data bases that have vectors and
  2689.         matrices use the application program interface for loading
  2690.         data.
  2691.        DO YOU HAVE ADDITIONAL RELATIONS TO LOAD--Y OR N
  2692.         If you want to load another relation, enter "Y". If all the
  2693.         data base to be loaded at this time has been loaded, enter
  2694.         "N".
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.  
  2714.  
  2715.  
  2716.  
  2717.                           Page 46
  2718.  
  2719.                               
  2720.                               
  2721.  
  2722.  
  2723.        3.0  RIM EXECUTION THROUGH THE APPLICATION PROGRAM INTERFACE
  2724.        Any programming language which can call FORTRAN subroutines
  2725.        can access and modify a pre-defined RIM data base through
  2726.        FORTRAN-callable subroutines contained in the RIM
  2727.        application program interface library(RIMLIB).  Data is
  2728.        accessed one row at a time.  The RIM data access subroutines
  2729.        store data in and retrieve data from an array you provide in
  2730.        your program logic.  In either case the array used must be
  2731.        large enough to hold one complete row for each relation
  2732.        accessed.
  2733.        Attributes which contain text data must be given particular
  2734.        care.  In general, Hollerith format (left adjusted, blank
  2735.        filled) is used.  Some textual parameters like those for
  2736.        data base, relation and attribute names must allow for eight
  2737.        characters (8H), others like key words such as INT, REAL
  2738.        etc. must allow room for four characters (4H).  Values of
  2739.        textual attributes or text strings used in conditional
  2740.        expressions are passed in an array packed together with
  2741.        other kinds of information.  Such text strings are left
  2742.        adjusted with unspecified fill.  The number of words such
  2743.        text strings occupy depends upon the length of the text
  2744.        string.  there are special instructions in appropriate
  2745.        sections on how to pass such attributes.
  2746.        The application program interface requires you to manage the
  2747.        data base files.  The data base files must exist on three
  2748.        properly named logical files before your program can be
  2749.        executed.
  2750.        Password checks operate in the application program interface
  2751.        in much the same way as in the standalone system.  No
  2752.        password permission is requird for RMOPEN, RMUSER, RMRULE,
  2753.        or RMTOL.  Read permission is required for all other calls
  2754.        except RMLOAD and RMPUT  for which modify permission is
  2755.        required.  Modify permission implies read permission.
  2756.        3.1  INITIALIZING THE DATA BASE
  2757.         CALL RMOPEN  (abname)
  2758.                ---------------------
  2759.                Input parameter:
  2760.            Dbname-- the name of the data base in Hollerith
  2761.                     format
  2762.        This routine initializes the internal tables used by RIM and
  2763.        opens the specified data base by reading the data base
  2764.        control information into the incore working areas.
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.                           Page 47
  2777.  
  2778.                               
  2779.                               
  2780.  
  2781.  
  2782.         CALL RMCLOS
  2783.                -----------
  2784.        This routine closes the current data base and copies the
  2785.        incore working areas to the logical data base files.  This
  2786.        routine is required (if you have modified the data base)
  2787.        before your program can access another data base.
  2788.        3.2  STATUS OF DATA BASE ACTIVITY
  2789.        When an operation on the data base has been attempted, the
  2790.        status of the operation is returned to the application
  2791.        program via the RMSTAT variable in the RIMCOM common block.
  2792.        This common block must be declared in the calling program as
  2793.        follows:
  2794.         COMMON /RIMCOM/ RMSTAT
  2795.         INTEGER RMSTAT
  2796.        The value of RMSTAT should be checked after each operation.
  2797.        A non-zero value indicates the operation was not successful.
  2798.         as a result, subsequent operations may not function as
  2799.        expected.  The RMSTAT values and meanings are as follows:
  2800.           -1  NO MORE DATA AVAILABLE FOR RETRIEVAL
  2801.            0  OK - OPERATION SUCCESSFUL
  2802.           10  DATA BASE FILES DO NOT CONTAIN A RIM DATA BASE
  2803.           11  DATA BASE NAME DOES NOT MATCH FILE CONTENTS
  2804.           12  INCOMPATIBLE DATA BASE FILES (DATE,TIME,ETC)
  2805.           13  DATA BASE IS ATTACHED IN READ ONLY MODE
  2806.           14  DATA BASE IS BEING UPDATED
  2807.           15  DATA BASE FILES ARE NOT LOCAL FILES
  2808.           16  DATA BASE HAS BEEN OPENED
  2809.           20  UNDEFINED RELATION
  2810.           30  UNDEFINED ATTRIBUTE
  2811.           40  MORE THAN 10 AND/OR OPERATORS IN THE WHERE CLAUSE
  2812.           41  ILLEGAL "LIMIT EQ N" CONDITION
  2813.           42  UNRECOGNIZED COMPARISON OPERATOR
  2814.           43  EQS ONLY AVAILABLE FOR TEXT ATTRIBUTES
  2815.           44  ILLEGAL USE OF MIN/MAX IN THE WHERE CLAUSE
  2816.           45  UNRECOGNIZED AN/OR OPERATOR
  2817.           46  COMPARED ATTRIBUTES MUST BE THE SAME TYPE/LENGTH
  2818.           47  LISTS ARE VALID ONLY FOR EQ AND NE
  2819.           50  RMFIND NOT CALLED
  2820.           60  RMGET NOT CALLED
  2821.           70  RELATION REFERENCE NUMBER OUT OF RANGE
  2822.           80  VARIABLE LENGTH ATTRIBUTES MAY NOT BE SORTED
  2823.           81  THE NUMBER OF SORTED ATTRIBUTES IS TOO LARGE
  2824.           89  SORT SYSTEM ERROR
  2825.           90  UNAUTHORIZED RELATION ACCESS
  2826.          100  ILLEGAL VARIABLE LENGTH ROW DEFINITION (LOAD/PUT)
  2827.          110  UNRECOGNIZED RULE RELATIONS
  2828.          111  MORE THAN 10 RULES PER RELATION
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.                           Page 48
  2836.  
  2837.                               
  2838.                               
  2839.  
  2840.  
  2841.        THE FOLLOWING CODES SHOULD NOT BE ENCOUNTERED IN NORMAL USE
  2842.           1001 BUFFER SIZE PROBLEM - BLKCHG,BLKDEF
  2843.           1002 UNDEFINED BLOCK - BLKLOC
  2844.           1003 CANNOT FIND A LARGER B-TREE VALUE - BTADD,PUTDAT
  2845.           1004 CANNOT FIND B-TREE BLOCK - BTPUT
  2846.           21XX RANDOM FILE ERROR XX ON FILE1
  2847.           22XX RANDOM FILE ERROR XX ON FILE2
  2848.           23XX RANDOM FILE ERROR XX ON FILE3
  2849.           24XX RANDOM FILE ERROR XX ON FILE4
  2850.        3.3  GENERAL ROUTINES
  2851.        The following routines are used to set the internal switches
  2852.        for rule checking, to specify the data base passwords, and
  2853.        to set the tolerance for real numbers.  These routines may
  2854.        be called any number of times with the new value overwriting
  2855.        the current value.
  2856.         CALL RMUSER (password)
  2857.                ---------------------
  2858.                Input Parameters:
  2859.                  password--the password in Hollerith (8H).
  2860.        This routine is used to provide the password necessary for
  2861.        checking data base access, relation read permission and
  2862.        relation modify premission.
  2863.         CALL RMRULE (switch)
  2864.         -------------------
  2865.                Input Parameters:
  2866.                 switch--- 0 no rule checking (NOCHECK RULES) (int)
  2867.                           1 check rules (CHECK RULES)
  2868.        This routine turns rule checking on and off (default--on if
  2869.        rules are defined).
  2870.         CALL RMTOL (val,percent)
  2871.         ------------------------
  2872.         Input Parameters:
  2873.                 val------the value of the tolerance (real)
  2874.                 percent--0 if "val" is the absolute tolerance value
  2875.                             (int)       
  2876.                          1 if "val" is the tolerance percent
  2877.        This routine sets the tolerance for floating point numbers,
  2878.        (default: 0.).
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.                           Page 49
  2895.  
  2896.                               
  2897.                               
  2898.  
  2899.  
  2900.        3.4  ACCESSING THE SCHEMA
  2901.        The following routines are used to obtain information about
  2902.        the data base schema.
  2903.         CALL RMLREL
  2904.         -----------
  2905.        This routine sets an implicit pointer (used by the routine
  2906.        RMGREL) to the first relation in the data base.  it must be
  2907.        called before data about any relations may be obtained.  If
  2908.        there are no relations defined for which the current user
  2909.        password has read permission, RMSTAT will return 90,
  2910.        otherwise 0.
  2911.           CALL RMGREL (rname,row,mpw,lastmod,numatt,numrows)
  2912.           Output Parameters:
  2913.             rname---relation name (8H)
  2914.             rpw-----read password (.TRUE. or .FALSE.)
  2915.             mpw-----modify password (.TRUE. or .FALSE.)
  2916.             lastmod-date of last modification of relation data (8H)
  2917.             numatt--number of attributes in the relation (int)
  2918.             numrows-number of rows of data in the relation (int)
  2919.        This routine returns the data about the current relation
  2920.        (the relation indicated by the current pointers) and the
  2921.        increments the implied pointer to point to the next relation
  2922.        for which read permission is available.  A successful
  2923.        execution of this routine sets RMSTAT equal to 0.  I f you
  2924.        change passwords between calls to RMLREL and RMGREL or
  2925.        between successive calls to RMGREL, unpredictable results
  2926.        may occur.  When the last relation is accessed RMSTAT will
  2927.        be set to -1.
  2928.        The following example shows how to use RMLREL and RMGREL to
  2929.        obtain the data about all relations in the data base.
  2930.                  .
  2931.                  .
  2932.                         .
  2933.         COMMON /RIMCOM/ RMSTAT
  2934.         INTEGER RMSTAT
  2935.                  .
  2936.                  .
  2937.                  .
  2938.         CALL RMOPEN (dbname)
  2939.         CALL RMUSER (password)
  2940.                  .
  2941.                  .
  2942.                  .
  2943.         CALL RMLREL
  2944.         IF (RMSTAT.EQ.0) GO TO 100
  2945.                  .
  2946.                          .
  2947.  
  2948.  
  2949.  
  2950.  
  2951.  
  2952.  
  2953.                           Page 50
  2954.  
  2955.                               
  2956.                               
  2957.  
  2958.  
  2959.                         .
  2960.            print message that no relations are available
  2961.            using the current password
  2962.                  .
  2963.                  .
  2964.                  .
  2965.            GO TO 200
  2966.        100 CONTINUE
  2967.            CALL RMGREL(rname,rpw,mpw,lastmod,numatt,numrows)
  2968.                  .
  2969.                  .
  2970.                  .
  2971.            printout the data about the relation, etc..........
  2972.                  .
  2973.                  .
  2974.                  .
  2975.            GO TO 100
  2976.        200 CONTINUE
  2977.                  .
  2978.                  .
  2979.                  .
  2980.            CALL RMLATT (rname)
  2981.            ------------------
  2982.            Input Parameters:
  2983.               rname --- relation name (8H)
  2984.        This routine sets an implied pointer to the first attribute
  2985.        of the specified relation.  if the relation exists and the
  2986.        current password allows access to relational data, RMSTAT
  2987.        will return 0.
  2988.            CALL RMGATT(aname,type,matvec,var,len1,len2,column,key)
  2989.            -------------------------------------------------------
  2990.            Output Parameters:
  2991.               aname---attribute name (8H)
  2992.               type----attribute type (INT,REAL,DOUB,TEXT) (4H)
  2993.               matvec--attribute type (VEC or MAT -otherwise
  2994.                       blank)(4H)
  2995.               var-----variable length attribute (.TRUE. or .FALSE.)
  2996.               len1----attribute length data as follows (int):
  2997.                       TEXT-number of characters
  2998.                       INT,REAL,DOUB,VEC-number of items
  2999.                       MAT-row dimension
  3000.               len2----column location in the relation (int)
  3001.                       (otherwise 0) (int)
  3002.               column--attribute column location in the relation
  3003.                       (int)
  3004.               key-----keyed attribute (.TRUE. or .FALSE.)
  3005.  
  3006.  
  3007.  
  3008.  
  3009.  
  3010.  
  3011.  
  3012.                           Page 51
  3013.  
  3014.                               
  3015.                               
  3016.  
  3017.  
  3018.        This routine returns the data about the current attribute
  3019.        (the attribute indicated by the implied pointer) and
  3020.        increments the implied pointer to point to the next
  3021.        attribute.  When the last attribute is accessed, RMSTAT will
  3022.        return -1.
  3023.        The following example shows the use of RMLREL,RMGREL,RMLATT,
  3024.        and RMGATT to obtain the data about all attributes for all
  3025.        realtions.  (the equivalent of LISTREL ALL)
  3026.                         .
  3027.                 .
  3028.                 .
  3029.             COMMON /RIMCOM/ RMSTAT
  3030.             INTEGER RMSTAT
  3031.                 .
  3032.                 .
  3033.                 .
  3034.             CALL RMOPEN(dbname)
  3035.             CALL RMUSER(password)
  3036.                 .
  3037.                 .
  3038.                 .
  3039.             CALL RMLREL
  3040.        100  CONTINUE
  3041.             CALL RMGREL(rname,rpw,mpw,lastmod,numatt,numrows)
  3042.             IF (RMSTAT.NE.0) GO TO 300
  3043.             CALL RMLATT(rname)
  3044.             DO 200 K=1,numatt
  3045.             CALL RMGATT(aname,type,matvec,var,len1,len2,column,key)
  3046.             IF(RMSTAT.NE.0) GO TO 300
  3047.                 .
  3048.                 .
  3049.                 .
  3050.             printout the relation and attribute data, etc..........
  3051.                 .
  3052.                 .
  3053.                 .
  3054.        200 CONTINUE
  3055.            GO TO 300
  3056.        300 CONTINUE
  3057.                 .
  3058.                 .
  3059.                 .
  3060.  
  3061.  
  3062.  
  3063.  
  3064.  
  3065.  
  3066.  
  3067.  
  3068.  
  3069.  
  3070.  
  3071.                           Page 52
  3072.  
  3073.                               
  3074.                               
  3075.  
  3076.  
  3077.        3.5  ACCESSING THE DATA BASE
  3078.        The routines which access the data base allow the following
  3079.        operations:
  3080.        1) GET an existing row of data from aspecified relation and
  3081.        store it in a local array (must be preceded by a RMFIND).
  3082.        2) LOAD a new row of data from a local array to the bottom
  3083.        of a specified relation (must be preceded by a RMFIND).
  3084.        3) PUT an existing row of data back into a specified
  3085.        relation after it has been modified (must be preceded by a
  3086.        RMFIND, RMGET).
  3087.        4) DELETE an existing row of data from a specified relation
  3088.        (must be preceded by a RMFIND, RMGET).
  3089.        Each of the above operations works on one row of data at a
  3090.        time.  RMGET increments the pointers to point to the next
  3091.        row.  The initial pointers must be established before the
  3092.        required operation can be performed (RMFIND).  The rows
  3093.        returned may be qualified with a WHERE clause (default - all
  3094.        rows) and the rows may also be returned in a sorted order
  3095.        (RMGET only).
  3096.        To support concurrent access to multiple relation, a
  3097.        parameter is provided to allow the assigning of a number to
  3098.        identify the set of pointers for a given relation.  In this
  3099.        way the operations on the data base are related to a number
  3100.        which in turn corresponds to the pointers for a single
  3101.        relation.
  3102.           CALL RMFIND (number,relname)
  3103.           ----------------------------
  3104.           Input Parameters:
  3105.             number---number (0-5) assigns a pointer for the
  3106.                      relation (int)     
  3107.             relname--relation name (8H)
  3108.        This routine establishes the initial pointer number for a
  3109.        relation.  A call to RMFIND must be made before calls to
  3110.        RMGET, RMWHER, RMLOAD, and RMSORT.
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124.  
  3125.  
  3126.  
  3127.  
  3128.  
  3129.  
  3130.                           Page 53
  3131.  
  3132.                               
  3133.                               
  3134.  
  3135.  
  3136.        CALL RMWHER (number,attname,operator,value,numval,nextboo,numboo)
  3137.        ----------------------------------------------------------------
  3138.        Input Parameters:
  3139.          number--number (0-5) identifies the relation pointer for
  3140.                  this operation (int)
  3141.          attname-array of attribute names (may also be attribute
  3142.                  number, ROWS or LIMIT) where the nth attname
  3143.                  corresponds to the nth WHERE clause (Hollerith)
  3144.          operator-array of operators (EQ,GT,EQA,EXIS,FAIL,etc.)
  3145.                  where the nth operator corresponds to the nth
  3146.                  WHERE clause (each 4H)
  3147.          value---2-dimensional array of (any type, fixed, or
  3148.                  variable) where the nth row corresponds to the nth
  3149.                  WHERE clause
  3150.                  The organization of the array is dependent on the
  3151.                  of the array is dependent on the attribute type
  3152.                  and length.  Let vset represent a list of values
  3153.                  (in most cases the list has one in vset (see the
  3154.                  SELECT command).  The rows are organized as
  3155.                  follows:
  3156.                  Fixed length attributes--------------------------
  3157.                   vset(1),vset(2),......,vset(numval)
  3158.                   where numval is equal to the number o f values in
  3159.                   the list (note if the EQA condition is used there
  3160.                   can only be one member in the vset, see the
  3161.                   SELECT command)
  3162.                  Variable length attributes------------------------
  3163.                   TEXT - c(1),0,vset(1),c(2),0,vset(2)............,
  3164.                          c(numval),0,vset(numval)
  3165.                          where c is the number of characters in the
  3166.                          corresponding vset and numval is equal to
  3167.                          the number of values in the list.
  3168.                  INT,REAL,DOUB,VEC - items(1),0,vset(1),items(2),0,
  3169.                  vset(2)....,items(numval),0,vset(numval)
  3170.                  where items is the number of items in the
  3171.                  corresponding vset and numval is equal to the
  3172.                  number of values in the list
  3173.                  MAT-rows(1),col(1),vset(1),rows(2),col(2),vset(2),
  3174.                  ......,rows(numval),col(numval),vset(numval)
  3175.                  where rows is the number of rows and cols is the
  3176.                  number of columns in the matrix
  3177.  
  3178.  
  3179.  
  3180.  
  3181.  
  3182.  
  3183.  
  3184.  
  3185.  
  3186.  
  3187.  
  3188.  
  3189.                           Page 54
  3190.  
  3191.                               
  3192.                               
  3193.  
  3194.  
  3195.          numval-number of values in the list of values (vset) where
  3196.                 the nth numval corresponds to the nth WHERE clause
  3197.                 (int array)
  3198.          nextboo-array of "AND" "OR" operators (each 4H)
  3199.          numboo-number of WHERE conditions (int).
  3200.        This routine qualifies a set of rows for retrieval (this
  3201.        corresponds to the where clause).
  3202.        For example, if the following WHERE clause were required:
  3203.        WHERE ATT1 EQ 4 7 12 OR ATT2 EQS "TEXT STRING" AND ATT3 +
  3204.        GT 5. AND ATT3 EQA ATT4
  3205.        (ATT1 -- integer length 1)
  3206.        (ATT2 -- text variable length)
  3207.        (ATT3 -- real length 1)
  3208.        (ATT4 -- real length 1)
  3209.        The arrays would contain:
  3210.        attname(1)   = 8HATT1
  3211.        attname(2)   = 8HATT2
  3212.        attname(3)   = 8HATT3
  3213.        attname(4)   = 8HATT3
  3214.        operator(1)  = 4HEQ
  3215.        operator(2)  = 4HEQS
  3216.        operator(3)  = 4HGT
  3217.        operator(4)  = 4HEQA
  3218.        value(1,1)   = 4
  3219.        value(1,2)   = 7
  3220.        value(1,3)   = 12
  3221.        value(1,4)   = value(1,5) = 0
  3222.        value(2,1)   = 11
  3223.        value(2,2)   = 0
  3224.        value(2,3)   = 4HTEXT
  3225.        value(2,4)   = 4 H STR
  3226.        value(3,1)   = 5.
  3227.        value(3,2)   = value(3,3) = value(3,4) = value(3,5)=0
  3228.        value(4,1)   = 4HATT4
  3229.        value(4,2)   = value(4,3) = value(4,4) = value(4,5)=0
  3230.        numval(1)    = 3
  3231.        numval(2)    = 1
  3232.        numval(3)    = 1
  3233.        numval(4)    = 1
  3234.        nextboo(1)   = 4HOR
  3235.        nextboo(2)   = 4HAND
  3236.        nextboo(3)   = 4HAND
  3237.        nextboo(4)   = 0
  3238.        numboo       = 4
  3239.        "Value" would be dimensioned (4,5) in the above example.
  3240.  
  3241.  
  3242.  
  3243.  
  3244.  
  3245.  
  3246.  
  3247.  
  3248.                           Page 55
  3249.  
  3250.                               
  3251.                               
  3252.  
  3253.  
  3254.        CALL RMSORT (number,attname,numsort,sortype)
  3255.        Input Parameters:
  3256.           number --- number (0-5) identifies the pointer for the
  3257.                      relation sorted (int)
  3258.           attname -- array of "numsort" attribute names to sort
  3259.                      on (each 8H)
  3260.           numsort -- number of attributes to sort (int)
  3261.           sortype -- sort control numbers, corresponding to
  3262.                      attname LT 0 causes descending sort,
  3263.                      GE 0 causes ascending sort (int array)
  3264.        This routine sorts the data prior to retrieval (this is
  3265.        equivalent to the SORTED BY clause).
  3266.        For example, if the following SORTED BY clause were
  3267.          required:
  3268.            SORTED BY ATT1=A ATT2=A ATT3=D
  3269.        The array would contain:
  3270.                 
  3271.          attname(1) = 8HATT1
  3272.          attname(2) = 8HATT2
  3273.          attname(3) = 8HATT3
  3274.          sortype(1) = 1
  3275.          sortype(2) = 1
  3276.          sortype(3) = -1
  3277.          numsort  = 3
  3278.           CALL RMGET (number,array)
  3279.           ------------------------
  3280.           Input Parameters:
  3281.             Number --- number (0-5) identifies the relation
  3282.                        pointer for this operation (int).
  3283.           Output Parameters:
  3284.             Array ---  array to receive the row of data (any type).
  3285.                        Let "coli" be the column number in the
  3286.                        relation for the ith attribute (see RMGATT).
  3287.                        Fixed length attributes--------------------
  3288.                         Array (coli) contains the start of the
  3289.                         value for the i-th attribute.
  3290.                        Variable length attributes----------------
  3291.                         Array (coli) contains the pointer "N"
  3292.                         which points to the start of the attribute
  3293.                         data in array.
  3294.                        Array(N) contains one of the following:
  3295.                        TEXT - number of characters
  3296.                        INT,REAL,DOUB,VEC - number of items
  3297.                        MAT(N+2) ,.....contains attribute values
  3298.        This routine gets a row of data from the specified relation
  3299.        and advances the pointer to the next qualifying row (as
  3300.        determined by RMWHER and RMSORT conditions).
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.  
  3307.                           Page 56
  3308.  
  3309.                               
  3310.                               
  3311.  
  3312.  
  3313.             The following figure illustrates the organization of fixed and vari-
  3314.        able
  3315.        length data in the array. The pointer word, array(p) contains values
  3316.        as shown. Word p+1 contains 0 or the column dimension for matrix attribute
  3317.        type.
  3318.        
  3319.                Figure 3.5-1 -- Organization of Array
  3320.         
  3321.             Fixed    Variable        Fixed             Variable Length   Variable
  3322.           Length=1    Length       Length=2             Attribute         Length
  3323.           Attribute  Attribute   Attribute              Parameters       Attribute
  3324.                                /------^--------\
  3325.        +--+---------+---------+---------+---------+-+---------+---------+---------
  3326.        +-+
  3327.        |  |         |         |         |         |X|         |         |        
  3328.        | |
  3329.        >  |    3    |    4    |    5    |    6    |X|    N    |  N+1    |  N+2   
  3330.        | >
  3331.        <  |         |         |         |         |X|         |         |        
  3332.        | <
  3333.        |  |         |         |         |         |X|         |         |        
  3334.        | |
  3335.        +--+---------+---------+---------+---------+-+---------+---------+---------
  3336.        +-+
  3337.              VALUE    POINTER   \-------v--------/   /---^---\             VALUE
  3338.                                      VALUE           * NO. Chars   0
  3339.                        +---+                           (text)
  3340.                        | N |                         * NO. Words   0
  3341.                        +-+-+                           (Int, Real)
  3342.                          |                           * NO. Items   0
  3343.                          |                             (DOUB, DVEC)
  3344.                          |                           * NO. Items   0
  3345.                          |                             (Ivec, RVEC)
  3346.                          |                           * Row Dimens. Col. Dimens.
  3347.                          |                             (Matrix)    (Matrix)
  3348.                          |                            \--v--/
  3349.                          |                               ^
  3350.                          |                               |
  3351.                          +-------------------------------+
  3352.        
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.  
  3364.  
  3365.  
  3366.                           Page 57
  3367.  
  3368.                               
  3369.                               
  3370.  
  3371.  
  3372.           CALL RMLOAD (number,array)
  3373.           -------------------------
  3374.           Input Parameters:
  3375.             number --- number (0-5) identifies the relation to
  3376.                        load (int).
  3377.             array ---- array containing the row of data to load
  3378.                        (any type).
  3379.                        (see RMGET for a description of array)
  3380.        This sequence of calls will modify a row of data in a
  3381.        specified relation.
  3382.            CALL RMGET (number,array)
  3383.            ------------------------
  3384.                      .
  3385.                      .
  3386.                      .
  3387.            CALL RMDEL (number)
  3388.            -------------------
  3389.            Input Parameters:
  3390.              number --- number (0-5) identifies the relation
  3391.                         from which rows are to be deleted (int).
  3392.        This sequence of calls will delete a row of data in a
  3393.        specified relation.
  3394.        Calls to RMPUT and RMDEL must be preceded by calls to RMGET
  3395.        since neither RMPUT or RMDEL advances the pointer they
  3396.        operate on to the next row.
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.                           Page 58
  3426.  
  3427.                               
  3428.                               
  3429.  
  3430.  
  3431.        RIM Handy Reference Card
  3432.        
  3433.        DEFINING A DATABASE SCHEMA
  3434.          DEFINE dbname
  3435.          OWNER password
  3436.          ATTRIBUTES
  3437.          attname {REAL} [{length}][KEY]
  3438.                  INT      VAR
  3439.                  TEXT
  3440.                  DOUB
  3441.                  RVEC
  3442.                  IVEC
  3443.                  DVEC
  3444.          attname {RMAT}  {row,col} [KEY]
  3445.                  IMAT     row,VAR
  3446.                  DMAT     VAR,VAR
  3447.          RELATIONS
  3448.          relname WITH attname1 [attname2...]
  3449.          PASSWORDS
  3450.          {READ PASSWORD} FOR {relname} IS password
  3451.          RPW                     ALL
  3452.          {MODIFY PASSWORD} FOR {relname} IS password
  3453.          MPW                     ALL
  3454.          RULES
  3455.          attname [IN relname]    {EQ} value [{AND}...]
  3456.                                   NE          OR
  3457.                                   GT
  3458.                                   GE
  3459.                                   LT
  3460.                                   LE
  3461.          attname IN relname      {EQA} attname IN relname [{AND}...]
  3462.                                   NEA                       OR
  3463.                                   GTA
  3464.                                   GEA
  3465.                                   LTA
  3466.                                   LEA
  3467.          END
  3468.        
  3469.        LOADING A RELATION
  3470.          LOAD relname
  3471.          value1 value2 ... valueN
  3472.          END
  3473.          value: SCALARS val1
  3474.                 TEXT "text string"
  3475.                 VECTOR (val1, val2, ...)
  3476.                 MATRIX(r1c1,r2c1,...),(r1c2,r2c2,...)...)
  3477.        
  3478.        QUERYING A RELATION
  3479.          SELECT {attname1 [=fid1],attname2[=fid2],...} FROM relname +
  3480.                  attnum1 [=fid1],...
  3481.                  attname1(i),...
  3482.  
  3483.  
  3484.                           Page 59
  3485.  
  3486.                               
  3487.                               
  3488.  
  3489.  
  3490.                  attname1(i,j)...
  3491.                  ALL
  3492.                  [SORTED BY attname1 [={A}],[attname2 [={A}]...]]+
  3493.                                         D                D
  3494.                  [WHERE ...]
  3495.          TALLY attname [={A}] FROM relname [WHERE...]
  3496.                           D
  3497.        
  3498.          WHERE CLAUSE:
  3499.        
  3500.          WHERE   attname         {EXISTS}                [{AND}...]
  3501.                                   FAILS                    OR
  3502.                                   EQS    value
  3503.                                   EQ     {value}
  3504.                                   NE      MAX
  3505.                                   GT      MIN
  3506.                                   LT
  3507.                                   LE
  3508.                                   GE
  3509.        
  3510.          WHERE   attname         {EQA}   attname         [{AND}...]
  3511.                                   NEA                      OR
  3512.                                   GTA
  3513.                                   GEA
  3514.                                   LTA
  3515.                                   LEA
  3516.        
  3517.          WHERE   ROWS            {EQ}    rownumber       [{AND}...]
  3518.                                   NE                       OR
  3519.                                   LT
  3520.                                   LE
  3521.                                   GE
  3522.                                   GT
  3523.        
  3524.          WHERE   {attname}       {EQ}    list            [{AND}...]
  3525.                   ROWS            NE                       OR
  3526.        
  3527.          WHERE   LIMIT           EQ      number          [{AND}...]
  3528.                                                            OR
  3529.        ...
  3530.        
  3531.        QUERYING THE SCHEMA
  3532.        
  3533.          LISTREL [relname]
  3534.                   ALL
  3535.          EXHIBIT attname1 [attname2...]
  3536.          PRINT RULES
  3537.        
  3538.        COMPUTATION COMMAND
  3539.        
  3540.          COMPUTE {COUNT} attname FROM relname [WHERE...]
  3541.  
  3542.  
  3543.                           Page 60
  3544.  
  3545.                               
  3546.                               
  3547.  
  3548.  
  3549.                   MIN
  3550.                   MAX
  3551.                   AVE
  3552.                   SUM
  3553.        
  3554.        MODIFICATION COMMANDS
  3555.        
  3556.          CHANGE {attname} TO value [IN relname] WHERE ...
  3557.                  attname(i)
  3558.                  attname(i,j)
  3559.          CHANGE {RPW} TO newpass FOR relname
  3560.                  MPW
  3561.          CHANGE OWNER TO newowner
  3562.          DELETE ROWS FROM relname WHERE ...
  3563.          DELETE DUPLICATES [attname1,attname2,...] FROM relname
  3564.          DELETE RULE rulenumber
  3565.          RENAME ATTRIBUTE attname TO newname [IN relname]
  3566.          RENAME RELATION relname TO newname
  3567.          REMOVE relname
  3568.        
  3569.        RELATIONAL ALGEBRA COMMANDS
  3570.        
  3571.          INTERSECT relname1 WITH relname2 FORMING relname3 +
  3572.                  [USING attname1 [attname2,...]]
  3573.          JOIN relname1 Using attname1 WITH relname2 USING attname2 +
  3574.                  FORMING relname3 [WHERE {EQ}]
  3575.                                           NE
  3576.                                           GT
  3577.                                           GE
  3578.                                           LT
  3579.                                           LE
  3580.          SUBTRACT relname1 FROM relname2 FORMING relname3 +
  3581.                  [USING attname1 [attname2,...]]
  3582.          PROJECT relname1 FROM relname2 USING +
  3583.                  {attname1,[attname2,...]} [WHERE ...]
  3584.                   ALL
  3585.        
  3586.        REPORT COMMANDS
  3587.        
  3588.          NEWPAGE
  3589.          BLANK n
  3590.          TITLE "title"
  3591.          DATE
  3592.          LINES n
  3593.          WIDTH n
  3594.        
  3595.        KEY COMMANDS
  3596.        
  3597.          BUILD KEY FOR attname IN relname
  3598.          DELETE KEY FOR attname IN relname
  3599.        
  3600.  
  3601.  
  3602.                           Page 61
  3603.  
  3604.                               
  3605.                               
  3606.  
  3607.  
  3608.        RIM-TO-RIM COMMAND
  3609.        
  3610.          UNLOAD [dbname [=newdbname]]   {SCHEMA} [relname1 [=mpw] +
  3611.                                          DATA
  3612.                                          ALL
  3613.                  [relname2 [=mpw],...]
  3614.        
  3615.        GENERAL COMMANDS
  3616.        
  3617.          INPUT {filename}
  3618.                 TERMINAL
  3619.          OUTPUT {filename}
  3620.                 TERMINAL
  3621.          EXIT
  3622.          QUIT
  3623.          MENU
  3624.          HELP [command name]
  3625.          USER password
  3626.          ECHO
  3627.          NOECHO
  3628.          CHECK
  3629.          NOCHECK
  3630.          TOLERANCE xx.xx [PERCENT]
  3631.          RELOAD
  3632.          CLOSE
  3633.        
  3634.        HOST DEPENDENT COMMANDS (note: may be CDC syntax)
  3635.        
  3636.          OPEN dbname [=filename],[UN=account],[PW=password],+
  3637.                  [DIRECT={R}]
  3638.                           W
  3639.          ZIP "jet statement"
  3640.  
  3641.  
  3642.  
  3643.  
  3644.  
  3645.  
  3646.  
  3647.  
  3648.  
  3649.  
  3650.  
  3651.  
  3652.  
  3653.  
  3654.  
  3655.  
  3656.  
  3657.  
  3658.  
  3659.  
  3660.  
  3661.                           Page 62
  3662.  
  3663.                               
  3664.                               
  3665.  
  3666.  
  3667.                       Summary of the Application Program Interface
  3668.        INITIALIZING THE DATA BASE
  3669.          CALL RMOPEN (dbname)
  3670.          Input parameter:
  3671.                  dbname -- the name of the data base in Hollerith format
  3672.          CALL RMCLOS
  3673.        
  3674.        GENERAL ROUTINES
  3675.          CALL RMUSER (password)
  3676.          Input parameters:
  3677.                  password -- the password text
  3678.          CALL RMRULE (switch)
  3679.          Input parameters:
  3680.                  switch -- 0 - no rule checking (Nocheck)
  3681.                            1 - check rules (CHECK)
  3682.          CALL RMTOL (value,switch)
  3683.          Input parameters:
  3684.                  value -- the value of the tolerance (real)
  3685.                  switch - 0 if "val" is tolerance value (int)
  3686.                           1 if "val" is tolerance percent
  3687.        ACCESSING THE SCHEMA
  3688.          CALL RMLREL
  3689.          CALL RMGREL(rname,rpw,mpw,lastmod,numatt,numrows)
  3690.          Output parameters:
  3691.           rname - relation name (text)
  3692.           rpw     read password, .TRUE. or .FALSE.
  3693.           mpw     modify password, .TRUE. or .FALSE.
  3694.           lastmod date of last modification in relation data in
  3695.                  yy/mm/dd format
  3696.           numatt  number of attributes in relation (int)
  3697.           numrows number rows of data in relation (int)
  3698.          CALL RMLATT(rname)
  3699.          Input parameters:
  3700.           rname - relation name in hollerith (text) format
  3701.          CALL RMGATT(aname,type,matvec,var,len1,len2,column,key)
  3702.          Output parameters:
  3703.           aname - attribute name
  3704.           type - attribute type (INT, REAL, DOUB, or TEXT)
  3705.           matvec- attribute type (VEC or MAT, else blank)
  3706.           var    variable length attribute, .TRUE. or .FALSE.
  3707.           len1 - attribute length data as follows (int):
  3708.                  TEXT - number of characters
  3709.                  INT, REAL, DOUB, VEC - number of items
  3710.                  MAT - row dimension
  3711.          len2 - Column dimension of MAT attributes, otherwise 0 (int)
  3712.          column- attribute column location in relation (int)
  3713.          key -   keyed attribute (.TRUE. or .FALSE.)
  3714.        
  3715.        ACCESSING THE DATA BASE
  3716.          CALL RMFIND(number,relname)
  3717.          Input parameters:
  3718.  
  3719.  
  3720.                           Page 63
  3721.  
  3722.                               
  3723.                               
  3724.  
  3725.  
  3726.            number - user assigned number (0-5) used to reference the
  3727.                          pointer for the relation (int)
  3728.            relname- relation name (characters, H format)
  3729.          CALL RMWHER(number,attname,operator,value,numval,nextboo,numboo)
  3730.          Input parameters:
  3731.            number - number (0-5) which identifies the relation pointer
  3732.                  for this operation (int)
  3733.            attname - array of attribute names, attribute numbers, the
  3734.                  keyword ROWS, or LIMIT
  3735.            operator - array of operators (EQ, GT, EQS, EQA, etc.)
  3736.            value -  2 dimensional array of WHERE clause "values"
  3737.            numval - Number of "values" in list of values
  3738.            nextboo - array of "AND" "OR" operators
  3739.            numboo - Number of WHERE conditions (int)
  3740.        
  3741.          CALL RMSORT(number,attname,numsort,sortype)
  3742.          Input parameters:
  3743.            number - number (0-5) which identifies the relation pointer
  3744.                  for this operation (int)
  3745.            attname - array of "numsort" attribute names to sort on
  3746.            numsort - number of attributes to sort on (int)
  3747.            sortype - sort control numbers: -1 = descending sort,
  3748.                          +1 = ascending sort.
  3749.          CALL RMGET(number,array)
  3750.          Input parameters:
  3751.            number - number (0-5) which identifies the relation pointer
  3752.                  for this operation (int)
  3753.          OUTPUT Parameters:
  3754.            array - array to receive the row of data
  3755.        
  3756.          CALL RMLOAD(number,array)
  3757.          Input parameters:
  3758.            number - number (0-5) which identifies the relation pointer
  3759.                  for this operation (int)
  3760.            array- array containing the row of data to load
  3761.        
  3762.          CALL RMPUT(number,array)
  3763.          Input parameters:
  3764.            number - number (0-5) which identifies the relation pointer
  3765.                  for this operation (int)
  3766.            array - array containing the modified row of data.
  3767.        
  3768.          CALL RMDEL (number)
  3769.          Input parameters:
  3770.            number - number (0-5) which identifies the relation pointer
  3771.                  to be deleted. (int)
  3772.        
  3773.  
  3774.  
  3775.  
  3776.  
  3777.  
  3778.  
  3779.                           Page 64
  3780.  
  3781.                               
  3782.                               
  3783.  
  3784.  
  3785.             The following is a small sample program in VAX Fortran to show how
  3786.        RIM may access the AERODB data base. It prints the following:
  3787.  
  3788.        1. All information about the schema (LISTREL ALL)
  3789.  
  3790.        2. The data in the relation REL300 sorted for the airports in
  3791.        Brazil sorted by descending altitude. CITYNAME is variable length
  3792.        and the commands are SELECT ALL FROM REL300 SORTED BY ALTITUDE=D
  3793.        WHERE CITYNAME EQS "BRAZIL".
  3794.  
  3795.          LOGICAL RPW,MPW,VAR,KEY
  3796.          COMMON/RIMCOM/RMSTAT
  3797.          INTEGER RMSTAT
  3798.          REAL*8 NAME,LASTMD,NAMEA,NAMEC,IVAR,DB,NAME
  3799.          DIMENSION NVAL(20)
  3800.          DIMENSION NAMEQS(5)
  3801.        C OPEN THE DATA BASE
  3802.          DBNAME=6HAERODB
  3803.          CALL RMOPEN(DBNAME)
  3804.        C LISTREL ALL
  3805.          CALL RMLREL
  3806.        100       CONTINUE
  3807.          CALL RMGREL(NAME,RPW,MPW,LASTMD,NUMATT,NUMROW)
  3808.          IF(RMSTAT.NE.0)GOTO 200
  3809.          LRP=3HNO 
  3810.          IF(RPW) LRP=3HYES
  3811.          MRP=3HNO
  3812.          IF(MPW)MRP=3HYES
  3813.          WRITE(6,110)NAME,LRP,MRP,LASTMD,NUMATT,NUMROW
  3814.        110       FORMAT(1X,A8,2(1X,A4),1X,A8,2I8)
  3815.          CALL RMLATT(NAME)
  3816.        120       CONTINUE
  3817.          CALL RMGATT(NAMEA,ITYPE,MAT,VAR,LEN1,LEN2,NCOL,KEY)
  3818.          IF(RMSTAT.NE.0)GOTO 100
  3819.          IVAR=5HFIXED
  3820.          IF(VAR)IVAR=8HVARIABLE
  3821.          IKEY=2HNO
  3822.          IF(KEY)IKEY=3HYES
  3823.          WRITE(6,130)NAMEA,ITYPE,MAT,IVAR,LEN1,LEN2,NCOL,IKEY)
  3824.        130       FORMAT(1X,A8,2(1X,A5),1X,A8,3I8,1X,A3)
  3825.          GOTO 120
  3826.        200       CONTINUE
  3827.        C SELECT ALL FROM REL300 SORTED BY ALTITUDE=D+
  3828.        C  WHERE CITYNAME EQS "BRAZIL"
  3829.          NAME=6HREL300
  3830.          CALL RMFIND(1,NAME)
  3831.          IF(RMSTAT.NE.0)GOTO 999
  3832.          NAMEQS(1)=6
  3833.          NAMEQS(2)=0
  3834.          NAMEQS(3)=4HBRAZ
  3835.          NAMEQS(4)=2HIL
  3836.  
  3837.  
  3838.                           Page 65
  3839.  
  3840.                               
  3841.                               
  3842.  
  3843.  
  3844.          NAMEC=8HCITYNAME
  3845.          IBOOOP=3HEQS
  3846.          CALL RMWHER(1,NAMEC,IBOOOP,NAMEQS,1,0,1)
  3847.          IF(RMSTAT.NE.0)GOTO 500
  3848.          NAMEA=8HALTITUDE
  3849.          CALL RMSORT(1,NAMEA,1,-1)
  3850.          IF(RMSTAT.NE.0)GOTO 999
  3851.        300       CONTINUE
  3852.          CALL RMGET(1,NVAL)
  3853.          IF(RMSTAT.NE.0)GOTO 500
  3854.          NUMX=(NVAL(5)-1)/10+1
  3855.          NUMP=6+NUMX
  3856.          WRITE(6,400)(NVAL(K),K=1,NUMP)
  3857.        400       FORMAT(A4,5I6,2X,30A1)
  3858.          GOTO 300
  3859.        500       CONTINUE
  3860.          IF(RMSTAT.LT.0)GOTO 1000
  3861.        999       CONTINUE
  3862.          WRITE(6,9001)RMSTAT
  3863.        9001      FORMAT(' RMSTAT:',I5)
  3864.        C CLOSE THE DATA BASE
  3865.        1000      CONTINUE
  3866.          CALL RMCLOS
  3867.          STOP
  3868.          END
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.  
  3892.  
  3893.  
  3894.  
  3895.  
  3896.  
  3897.                           Page 66
  3898.  
  3899.                               
  3900.                               
  3901.  
  3902.  
  3903.                                        LIMITATIONS
  3904.  
  3905.             There is no limit on the number of rows of a relation except disk
  3906.        size.
  3907.  
  3908.             A row in a relation must fit in 1021 words. If len(i) is the fixed
  3909.        length
  3910.        (in words) of the ith attribute and var(j) is the length (in words) of
  3911.        the jth variable length attribute, then
  3912.        SUM(len(i) for i=1 to max)+sum((var(j)+3) for j=1 to max) must be less
  3913.        than 1021. This can mean that relations that fit on 60 bit
  3914.        machines may not fit on 32 bit machines.
  3915.  
  3916.             A relation or attribute name must not begin with the character string
  3917.        "RMRUL".
  3918.  
  3919.             The following words may not be used in attribute or relation names:
  3920.        TO, FROM, BY, USING, WHERE, IN, FORMING, ROWS, LIMIT, DUPLICATE.
  3921.        Also, names must not be a substring of the above
  3922.        which is 3 characters or more long starting with the first
  3923.        character. Thus FOR and FORM are illegal, however FORT is OK.
  3924.  
  3925.             In loading data, the value of the first attribute, if it is text,
  3926.        is limited as follows:
  3927.        If the relation contains only 1 or 2 attributes, then the following
  3928.        text strings and their RIM substrings are not allowed as values for
  3929.        the first attribute:
  3930.        CHECK, NOCHECK, ECHO, NOECHO, END, HELP, INPUT, OUTPUT, QUIT.
  3931.        If the relation contains three attributes then the value for the
  3932.        first attribute may not be HELP or HEL.
  3933.  
  3934.             The number of items in one command may not exceed 100.
  3935.  
  3936.             The number of rules specified for one relation may not exceed 10.
  3937.  
  3938.             The number of conditions used in the SELECT WHERE clause may not
  3939.        exceed 10.
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950.  
  3951.  
  3952.  
  3953.  
  3954.  
  3955.  
  3956.                           Page 67
  3957.  
  3958.                               
  3959.                               
  3960.  
  3961.  
  3962.                        Entering Input with the RIM User Interface
  3963.  
  3964.             The following discusses the reading and parsing of commands and
  3965.        data in the standalone system.
  3966.  
  3967.             The RIM user interface is a free-field input routine used by the RIM
  3968.        standalone system which separates user input into items which are
  3969.        grouped into records.
  3970.  
  3971.                                        Terminology
  3972.  
  3973.             1.   LINE - One line of information with a max-
  3974.                 imum of 80 characters
  3975.                 including blanks.
  3976.  
  3977.             2.   ITEM - One piece of information. An item
  3978.                 may be a real number,
  3979.                 an integer or text. Items are delimited by
  3980.                 blanks or commas. Multiple
  3981.                 blanks count as a single blank. Multiple
  3982.                 commas generate null items.
  3983.  
  3984.             3.   RECORD - A collection or list of up to 100
  3985.                 items entered in
  3986.                 response to a single request for data by the
  3987.                 calling program.
  3988.  
  3989.             4.   INTEGER - all characters must be numeric
  3990.                 except that the first
  3991.                 may be a + or - sign. For example: -1 23
  3992.                 +10000
  3993.  
  3994.             5.   REAL - An item of the form I1.I2EI3 where
  3995.                 I1 and I3 may be
  3996.                 signed integers and I2 is an unsigned in-
  3997.                 teger. The entire form is
  3998.                 not necessary but at least one digit and the
  3999.                 . or two digits
  4000.                 separated by the E are required.
  4001.  
  4002.             6.   TEXT - Any single item that is not integer
  4003.                 or real. If a text
  4004.                 item looks like an integer or real it must
  4005.                 be enclosed in quotes (").
  4006.  
  4007.                          Composing Records
  4008.  
  4009.             Ordinarily records consist of one line. However
  4010.        multiple records may be put
  4011.        on a line by separating them with dollars or
  4012.        semicolons. Alternatively,
  4013.  
  4014.  
  4015.                           Page 68
  4016.  
  4017.                               
  4018.                               
  4019.  
  4020.  
  4021.        a record may span several lines by ending all but the
  4022.        last line with a
  4023.        plus. Items must be wholly contained on one line with
  4024.        the exception of
  4025.        quoted text items and comments.
  4026.                       Special Items - +,(, )
  4027.  
  4028.             Equals and left and right parentheses are
  4029.        treated as single items
  4030.        unless enclosed in quoted text items. Thus a=3. is 3
  4031.        items, two
  4032.        text and one real rather than one. "a=3." is one
  4033.        item.
  4034.                           Multiple Commas
  4035.  
  4036.             If more than one comma separates 2 items, each
  4037.        additional comma
  4038.        will generate a text item with 3 characters, "-0-".
  4039.                        Rules for Text Items
  4040.  
  4041.             A quoted text item is terminated by a record
  4042.        separator (dollar
  4043.        or semicolon). Quoted text items may be continued on
  4044.        multiple
  4045.        lines. If the trailing quote is omitted on the last
  4046.        item in a
  4047.        record, the quoted item is terminated at the record
  4048.        separator, if
  4049.        any, or the last nonblank character on the line.
  4050.        Quotes may be included
  4051.        in quoted text strings by doubling the quotes (e.g.,
  4052.        "a,""b"
  4053.        yields a,"b as a text string). The total number of
  4054.        characters for all
  4055.        text strings in a record is limited to 2000.
  4056.                              Comments
  4057.  
  4058.             Comments may be included anywhere in the input
  4059.        stream by enclosing them
  4060.        between *( and ). For example *( this is a comment).
  4061.        Comments are
  4062.        completely ignored by the user interface. Empty lines
  4063.        between records
  4064.        are ignored and may be used to paragraph input. An
  4065.        alternative form
  4066.        of comment is */ ... / which may be used if you need
  4067.        to have parentheses
  4068.        inside the comment.
  4069.                           DATA GENERATION
  4070.  
  4071.  
  4072.  
  4073.  
  4074.                           Page 69
  4075.  
  4076.                               
  4077.                               
  4078.  
  4079.  
  4080.             Activities such as entering large volumes of
  4081.        data can be eased by
  4082.        using the data generation facilities.
  4083.  
  4084.             REPEATING ITEMS ON PREVIOUS RECORD
  4085.  
  4086.             A data item of the form *n where n is an un-
  4087.        signed integer, indicates
  4088.        that the next n items are identical to the cor-
  4089.        responding n items in
  4090.        the previous record.
  4091.        An isolated * is taken as *1. Double asterisks (**)
  4092.        indicate
  4093.        that the remaining items in the previous record are
  4094.        to be copied
  4095.        to the current record.
  4096.  
  4097.             REPEATING AN ITEM IN THE CURRENT RECORD - *=N,
  4098.        *=N+STEP
  4099.  
  4100.             An item of the form *=n, where n is an unsigned
  4101.        integer, indicates
  4102.        that the next n items are identical to the im-
  4103.        mediately preceding
  4104.        item. An item of the form *=n+step or *=n-step, where
  4105.        step is an
  4106.        unsigned real or integer, indicates that the next n
  4107.        items are to
  4108.        be generated by consecutively incrementing the im-
  4109.        mediately preceding
  4110.        item.
  4111.  
  4112.             GENERATING MULTIPLE RECORDS *+N
  4113.  
  4114.             A record beginning with *+n where n is an un-
  4115.        signed integer indicates
  4116.        that the next n records are to be generated from the
  4117.        preceding
  4118.        record. Each item of the generated record is formed
  4119.        by adding an
  4120.        item of the *+n record to the corresponding item of
  4121.        the immediately
  4122.        preceding record. A zero (integer) item should be in-
  4123.        serted
  4124.        in an *+n record for text items in the preceding
  4125.        record. The number of
  4126.        items after the *+n must match the number in the pre-
  4127.        ceding record.
  4128.  
  4129.                      Notes on Generating Items
  4130.  
  4131.  
  4132.  
  4133.                           Page 70
  4134.  
  4135.                               
  4136.                               
  4137.  
  4138.  
  4139.             When increments are specified, either on the *+n
  4140.        record or as
  4141.        step on an *=n+step item they must match the item
  4142.        thye are
  4143.        incrementing in type. It should be noted that the *+n
  4144.        record
  4145.        generation optuion is based on the expanded represen-
  4146.        tation of
  4147.        the previous record. The generation does not operate
  4148.        on the card
  4149.        image of the preceding record if it contains data
  4150.        generation items.
  4151.        Therefore it is not possible to repeat or increment
  4152.        an asterisk-type
  4153.        item.
  4154.  
  4155.                              Examples
  4156.  
  4157.             Consider the following 7 input records to il-
  4158.        lustrate data generation
  4159.        features:
  4160.        
  4161.        1 2 3 4 5 6 7 8 9 10 11 12
  4162.        2 1 *2 4 *=2 1 *=2+2 **
  4163.        *+1 0 *=3 0 *=5 **
  4164.        *+1 0 *=11
  4165.        *+1 *12
  4166.        *+1 **
  4167.        **
  4168.  
  4169.             Twelve data items are defined by each of these
  4170.        records. Each of the
  4171.        last six records is translated into the same internal
  4172.        record which
  4173.        is: 2 1 3 4 4 4 4 1 3 5 11 12
  4174.        Note - the last 5 records could be replaced by the
  4175.        single record
  4176.        *+5 **
  4177.        instead.
  4178.  
  4179.  
  4180.                     Changing Special Characters
  4181.  
  4182.             It is possible to change the special characters
  4183.        the user interface
  4184.        uses to break apart records. These special characters
  4185.        may either be
  4186.        changed to others or set to null so they are ignored.
  4187.        This is useful
  4188.        for reading specially formatted files or to allow
  4189.        special characters
  4190.  
  4191.  
  4192.                           Page 71
  4193.  
  4194.                               
  4195.                               
  4196.  
  4197.  
  4198.        to appear as input in text items. To change special
  4199.        characters enter
  4200.        the following special comment as the only entry on a
  4201.        line between
  4202.        records:
  4203.  
  4204.        *(SET KEYWORD=newvalue)
  4205.  
  4206.        where KEYWORD can be DOLLAR, SEMI, QUOTES, BLANK,
  4207.        PLUS, or COMMA
  4208.        and newvalue is either the word NULL or the new spe-
  4209.        cial character.
  4210.        For example if one wanted to use dollar to delimit
  4211.        items rather
  4212.        than records and not to have commas delimit items one
  4213.        would enter:
  4214.  
  4215.        *(SET DOLLAR=NULL)
  4216.        *(SET COMMA=$)
  4217.  
  4218.         and commas could now be used in unquoted text
  4219.        strings. Note the function
  4220.        is altered, so for example the + sign still has its
  4221.        usual function
  4222.        in real numbers. To restore the original delimiters
  4223.        one could say:
  4224.  
  4225.        *(SET DOLLAR=$)
  4226.        *(SET COMMA=,)
  4227.  
  4228.  
  4229.  
  4230.  
  4231.  
  4232.  
  4233.  
  4234.  
  4235.  
  4236.  
  4237.  
  4238.  
  4239.  
  4240.  
  4241.  
  4242.  
  4243.  
  4244.  
  4245.  
  4246.  
  4247.  
  4248.  
  4249.  
  4250.  
  4251.                           Page 72
  4252.  
  4253.                               
  4254.                               
  4255.  
  4256.  
  4257.  
  4258.  
  4259.  
  4260.  
  4261.  
  4262.  
  4263.  
  4264.  
  4265.  
  4266.  
  4267.  
  4268.  
  4269.  
  4270.  
  4271.  
  4272.  
  4273.  
  4274.  
  4275.  
  4276.  
  4277.  
  4278.  
  4279.  
  4280.  
  4281.  
  4282.  
  4283.  
  4284.  
  4285.  
  4286.  
  4287.  
  4288.  
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.  
  4297.  
  4298.  
  4299.  
  4300.  
  4301.  
  4302.  
  4303.  
  4304.  
  4305.  
  4306.  
  4307.  
  4308.  
  4309.  
  4310.                           Page 73
  4311.  
  4312.                                INDEX
  4313.  
  4314.  
  4315.  
  4316.  
  4317.  
  4318.        ATTRIBUTES   15
  4319.  
  4320.        BLANK Command   38
  4321.        BUILD KEY Command   31
  4322.  
  4323.        CHANGE Command   29
  4324.        CHANGE OWNER Command   30
  4325.        CHANGE PASSWORD Command   31
  4326.        CLOSE Command   12
  4327.        COMPUTE Command   28
  4328.  
  4329.        Data Base Creation Option   42
  4330.        Data Base Update Option   42
  4331.        DATE Command   38
  4332.        Define RELATIONS   16
  4333.        Define RULES   17
  4334.        Define Submodule Commands   15, 18
  4335.        DELETE DUPLICATES Command   29
  4336.        DELETE KEY Command   31
  4337.        DELETE ROW Command   29
  4338.  
  4339.        ECHO Command   13
  4340.        EXHIBIT Command   27
  4341.        EXIT Command   14
  4342.  
  4343.        HELP Command   9
  4344.  
  4345.        INPUT Command   12
  4346.        INTERSECT Command   32
  4347.  
  4348.        JOIN Command   34
  4349.  
  4350.        LINES Command   38
  4351.        LISTREL Command   27
  4352.        Load Submodule Commands   19
  4353.  
  4354.        MENU Command   11
  4355.  
  4356.        NEWPAGE Command   38
  4357.        NOCHECK Command   14
  4358.        NOECHO Command   13
  4359.  
  4360.        OPEN Command   12
  4361.        OUTPUT Command   13
  4362.        OWNER password   15
  4363.  
  4364.        PRINT RULES Command   28
  4365.        PROJECT Command   35
  4366.  
  4367.  
  4368.  
  4369.                           Page X-1
  4370.  
  4371.                               
  4372.                               
  4373.  
  4374.  
  4375.        Query Option   42
  4376.  
  4377.        RELOAD Command   14
  4378.        REMOVE Command   31
  4379.        RENAME Attribute Command   30
  4380.        RENAME RELATION Command   31
  4381.  
  4382.        SELECT command   21, 22, 23
  4383.        SUBTRACT Command   36
  4384.  
  4385.        TALLY Command   26
  4386.        TITLE Command   38
  4387.        TOLERANCE Command   13
  4388.        Type1 Attributes   16
  4389.        Type2 Attributes   16
  4390.  
  4391.        UNLOAD Command   39
  4392.        USER Command   12
  4393.  
  4394.        WIDTH Command   38
  4395.  
  4396.  
  4397.  
  4398.  
  4399.  
  4400.  
  4401.  
  4402.  
  4403.  
  4404.  
  4405.  
  4406.  
  4407.  
  4408.  
  4409.  
  4410.  
  4411.  
  4412.  
  4413.  
  4414.  
  4415.  
  4416.  
  4417.  
  4418.  
  4419.  
  4420.  
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.  
  4427.  
  4428.                           Page X-2
  4429.  
  4430.